wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Brightchamps:Edublocks

Total questions: 120

Worksheet time: 1hrs 7mins

Name
Class
Date
1.

Algorithm is a (a)   stage of a coding.

2.

Name the variable in this code .

(a)  

3.

Algorithm is a unique set of instructions and there is only one type of algorithm for a particular task.

a)

True

b)

False

4.

What will be the angle of turn to draw a Hexagon in the turtle screen ?

a)

60

b)

62

c)

6

d)

360/7

5.

How many variables will be required to find the area of a cube ?

a)

1

b)

2

c)

3

d)

4

6.

Which loop is used in the following Output of a program?

a)

while

b)

for

c)

if

d)

forever

7.

Iteration done on the number of alphabets in a Dictionary will use which kind of flow control statement?

a)

until

b)

while

c)

for

d)

forever

8.

How many variables are there in this ?

a)

3

b)

4

c)

2

d)

5

9.

What makes the function more defined?

a)

Function inside function

b)

Function with arguments

c)

Function inside loop

d)

None of the above

10.

 

Which one of the following used to store data in a "LAST IN FIRST OUT" manner

a)

Local Variables

b)

Tuples

c)

Lists

d)

Turtle

11.

 

Lists are Heterogeneous type of storage?

a)

False

b)

True

c)

May be

12.

What will be the result of this input?

a)

Circle with one color

b)

Circle with two color

c)

Hexagon with one color

d)

Circular Hexagon

13.

What is the output of the following program : print((1.3, 9) + (2.4, 14))

a)

(10.3)(16.4)

b)

1.3,9+2.4,14

c)

26.7

d)

(1.3,9,2.4,14)

14.

list_1 = ['edu', 'blocks', 123, 2022]

list_2 = [7,6,5,4,3 ]

Guess the output?

print (list_1[0])

print (list_1[3])

print (list_2[-2])

print (list_2[1])

a)

edu,2022,4,6

b)

edu

2022

4

6

c)

[edu,2022,4,6]

d)

error

15.

If y=100, then float(y) will give the output as ?

a)

100

b)

100.00

c)

100.0

d)

100.000

16.

 

Will the shown blocks are enough to launch a turtle screen?

a)

Yes

b)

No

17.

The shown block will let

a)

print two strings one after another

b)

print two strings one below another

c)

print one string and one integer together

d)

Print one string and one integer one below another

18.

How many types of switch cases are there in total?

a)

6

b)

7

c)

5

d)

3

19.

Import time block is responsible for making the

a)

Time go fast

b)

To let time block work in anyway

c)

nothing related to time

d)

Time go slow

20.

In which of the following loop in python, we can check the condition ?

a)

if

b)

while

c)

for

d)

for and if both

21.

For i in range(-3), how many times this loop will run and print the next statement?

a)

4

b)

3

c)

depends upon the value of i

d)

invalid , will show error

22.

What is displayed by this code?

a)

0

b)

1

c)

0+1

d)

Mynumber

23.

What should be there at the ?? to draw a circle ?

a)

90

b)

60

c)

360/3

d)

120

24.

EduBlocks was developed by Joshua Lowe

a)

Van Rossum

b)

Joshua Lowe

25.

Which keyword is used for function ?

a)

Fun

b)

Define

c)

Def

d)

Function

26.

What is the use of Turtle?

a)

Gives Drawing space

b)

Gives area for writing

c)

Gives area for coding

d)

none of the above

27.

100 mod(%)50 =

a)

0

b)

10

c)

10

d)

2

28.

25 mod(%) 12=

a)

0

b)

1

c)

10

d)

none of the above

29.

While loop works exactly like (a)   loop in Scratch.

30.

'For' loop iterate over the items of a list and string.

a)

True

b)

False

31.

(a)   are one of the most versatile data storage used in Python.

32.

Lists can have fixed number of items.

a)

True

b)

False

33.

List is a kind of (a)  

34.

Append function in list will be used to

a)

add the element in a list

b)

add the element at the end of the list

c)

add the element in a particular index of a list

d)

none of the above

35.

_____ function is used to add another list inside the list.

a)

append

b)

extend

c)

insert

d)

add

36.

Input: list [1,2,3,4,5,6]

list._____(2)

output: [1,2,4,5,6]

Which operation must be used to get this output?

a)

remove

b)

pop

c)

append

d)

delete

37.

list1 = [1, 3]

list2 = list1

list1[0] = 4

print(list2)

The Output will be :

a)

[1, 4]

b)

[1, 3, 4]

c)

[4, 3]

d)

[1, 3]

38.

Which one of the following is the use of function in python?

a)

Functions don’t provide better modularity for your application

b)

you can’t also create your own functions

c)

Functions are reusable pieces of programs

d)

All of the mentioned

39.

Which of the following Python statements will result in the output: 6?

A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

a)

A[2][1]

b)

A[1][2]

c)

A[3][2]

d)

A[2][3]

40.

What is the difference between both the commands?

a)

1. used for calling a list

2. used to get an array

b)

1. used to get an array

2. used for calling a list

c)

1. used for calling a list

2. used to get myList

d)

none of the above

41.

Remove function is used to remove the particular element from the list.

a)

True

b)

False

42.

What will be the output ?

a)

[1, 2, 3, 3 ,8, 4]

b)

[1, 2, 8, 3, 4]

c)

[1, 2, 3, 4, 3 ,8]

d)

[1, 2, 3, 8, 4]

43.

What do we call this 'n' in this figure?

a)

n

b)

function

c)

parameter

d)

argument

44.

What is output of print(math.pow(3, 2))?

a)

8

b)

9

c)

none

d)

9.0

45.

What is the Boolean output of print 0.1 + 0.2 == 0.3?

a)

True

b)

False

c)

Depends on the platform

d)

None of the above

46.

Guess the output.

a)
b)
c)
d)

none of the above

47.

The (a)   in python are used to combine TRUE and FALSE values of variables.

48.

Consider the following and mark the statement as per Logical Operator Category: ( And, Or, Not )

a)

1. AND

2. OR

3. NOT

b)

1. AND

2. AND

3. NOT

c)

1. OR

2. AND

3. NOT

d)

1. OR

2. AND

3. AND

49.

____ is also known as non positive and non negative number.

a)

1

b)

any variable

c)

0

d)

none of the above

50.

Which of the following loops has a more rigid syntax?

a)

For

b)

While

c)

Until

d)

None

51.

Mathematical operations can be performed on a string.

a)

True

b)

False

52.

What is the answer to this expression, 22 % 3 is?

a)

8

b)

7

c)

0

d)

1

53.

What is the order of precedence in python?

i) Parentheses

ii) Exponential

iii) Multiplication

iv) Division

v) Subtraction

vi) Addition

a)

i,ii,iii,iv,v,vi

b)

i,ii,iii,iv,vi,v

c)

ii,i,iii,iv,v,vi

d)

ii,i,iv,iii,v,vi

54.

What is the correct sequence to create a FOR loop ?

a)

Initialization,

Increment , Expression,

b)

Initialization, Increment,

Expression

c)

Initialization, Expression, Increment

d)

none

55.

Choose the correct option for the flow control statements.

a)

for, while , else ,elif , if elif, elif, if else

b)

for, while, if elif , else, if else, elif

c)

while, for, if elif, if, else, elif

d)

for, while if elif, else, elif, if else

56.

What is the RGB color sequence of Black color ?

a)

0,255,0

b)

0,0,255

c)

0,0,0

d)

255,0,0

57.

As soon as you create a list , it shows up in which Block ?

a)

List

b)

myList

c)

Variable

d)

Logic

58.

Name the blocks used in this code .

a)

Statements, Maths

b)

Logic , Statements

c)

Statement, loops

d)

Loops , logic

59.

Which of the following is invalid?

a)

_a = 1

b)

__a = 1

c)

__str__ = 1

d)

none of the mentioned

60.

All keywords in Python are in _________

a)

lower case

b)

UPPER CASE

c)

Capitalized

d)

None of the mentioned

61.

What will be the output ?

a)

0

1

b)

1

2

c)

error

d)

0.0

1.1

62.

What is the output when we execute list(“hello”)?

a)

[‘olleh’]

b)

[‘hello’]

c)

[‘llo’]

d)

[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]

63.

Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]

a)

[2, 33, 222, 14]

b)

Error

c)

25

d)

[25, 14, 222, 33, 2]

64.

What will be the output of the following Python code?

a=[1,2,3]

b=a.append(4)

print(b)

a)

1,2,3,4,5

b)

[1,2,3,4]

c)

[1,2,3,1]

d)

None

65.

The views available in Edublocks are:

a)

Text on the blocks

b)

Python view

c)

Cross-Platform

d)

All of the above

66.

What does Turtle uses for graphics?

a)

inter

b)

tkinter

c)

tinker

d)

kinter

67.

 Turtle comes with Python’s Standard Library.

a)

True

b)

False

68.

Name the 6 different types of flow control statements available in Python:

4 lines
69.

Python is the only language that can use (a)   within for a loop.

70.

The two kinds of loop structures are ____ and _____

(a)  

71.

Which loop has a definite iteration ?

a)

if

b)

for

c)

while

d)

if else

72.

(a)    is simply a “chunk” of code that you can use over and over again, rather than writing it out multiple times.

73.

The data that you can pass into a function is called

a)

argument

b)

function

c)

parameter

d)

none

74.

Information can be passed into functions as

a)

parameters

b)

arguments

c)

functions

d)

none

75.

Arguments are specified after the function name, inside the parentheses.

a)

true

b)

false

76.

We can add any number of arguments in a function inside the parentheses. For this you can use

a)

.

b)

,

c)

/

d)

"

77.

 Functions in python  only runs when it is called.

a)

true

b)

false

78.

A list is an ordered and immutable Python container.

a)

false

b)

true

79.

Which of the following operator is a unary operator?

a)

and

b)

or

c)

not

d)

none

80.

For TRUE AND TRUE , the result will be

a)

True

b)

False

c)

None

81.

What is the correct syntax for importing the turtle ?

a)

from turtle import *

b)

import turtle*

c)

import from turtle*

d)

none of the above

82.

What will be the output of this code ?

a)

Black screen

b)

Error

c)

Invalid syntax

d)

Blank White screen

83.

What will be the output of this?

a)
b)
c)
d)
84.

turtle.left(50) will do

a)

move left by 50 steps

b)

move left by 50 degree

c)

turn left by 50 degree

d)

Invalid

85.

Which kind of loop will be used to get the Greatest number out of 3 numbers ?

a)

if loop

b)

nested if else

c)

nested if

d)

for loop

86.

Which one is not a valid loop in Edublocks

a)

if

b)

else if

c)

elif

87.

What are the two ways to terminate the While condition ?

a)

break , false

b)

true , false

c)

break, stop

d)

break, jump

88.

If we define 2 parameters in a definition and pass 3 arguments , will it work ?

a)

Yes

b)

No

89.

What will be the datatype of the var in the below code ?

var = 10

print(type(var))

var = "Hello"

print(type(var))

a)

str and int

b)

int and int

c)

str and str

d)

int and str

90.

How is a code block indicated in Python?

a)

Brackets.

b)

Indentation.

c)

Key.

d)

None of the above.

91.

What will be the output of the following code ?

print(type(5 / 2))

print(type(5 // 2))

a)

float and int

b)

int and float

c)

float and float

d)

int and int

92.

What will be the output of the following code ?

a = [1, 2, 3, 4, 5]

sum = 0

for ele in a:

sum += ele

print(sum)

a)

20

b)

0

c)

15

d)

none of these

93.

 

What will be the output of the following code?

count = 0

while(True):

if count % 3 == 0:

print(count, end = " ")

if(count > 15):

break;

count += 1

a)

0 3 6 9 12

b)

0 1 2 ….. 15

c)

Infinite Loop

d)

0 3 6 9 12 15

94.

 

Which of the following concepts is not a part of Python?

a)

Pointers

b)

loops

c)

functions

d)

turtle

95.

What will be the output of the following code ?

def solve(a, b):

return b if a == 0 else solve(b % a, a)

print(solve(20, 50))

a)

100

b)

20

c)

50

d)

10

96.

What will be the output of the following code ?

def solve(a):

a = [1, 3, 5]

a = [2, 4, 6]

print(a)

solve(a)

print(a)

a)

[2, 4, 6]. [2, 4, 6]

b)

[2, 4, 6], [1, 3, 5]

c)

[1. 3. 5], [1, 3, 5]

d)

None of these.

97.

What will be the output of the following code snippet?

a = 3 b = 1

print(a, b)

a, b = b, a

print(a, b)

a)

1 3    1 3

b)

3 1    3 1

c)

3 1    1 3

d)

1 3    3 1

98.

Which of the following types of loops are not supported in Python?

a)

for

b)

while

c)

do-while

d)

None of the above

99.

Which of the following is the proper syntax to check if a particular element is present in a list?

a)

if ele in list

b)

if not ele not in list

c)

Both A and B

d)

None of the above

100.

What will be the output of the following code ?

def thrive(n):

if n % 15 == 0:

print("thrive", end = “ ”)

elif n % 3 != 0 and n % 5 != 0:

print("neither", end = “ ”)

elif n % 3 == 0:

print("three", end = “ ”)

elif n % 5 == 0: print("five", end = “ ”)

thrive(35)

a)

thrive

b)

neither

c)

three

d)

five

101.

 

What will be the output of the following code snippet?

def check(a):

print("Even" if a % 2 == 0 else "Odd")

check(12)

a)

even

b)

odd

c)

error

d)

none

102.

What will be the output of the following code snippet?

example = ["Sunday", "Monday", "Tuesday", "Wednesday"]; print(example[-3:-1])

a)

['Wednesday', 'Monday']

b)

['Sunday', 'Monday']

c)

['Tuesday', 'Wednesday']

d)

['Monday', 'Tuesday']

103.

What will be the output of the following code snippet?

a = [1, 2]

print(a * 3)

a)

[1, 2]

b)

[1, 2, 1, 2]

c)

[1, 2, 1, 2, 1, 2]

d)

Error

104.

What will be the output of the following code snippet?

example = ["Sunday", "Monday", "Tuesday", "Wednesday"];

del example[2]

print(example)

a)

['Sunday', 'Monday', 'Tuesday', 'Wednesday']

b)

['Sunday', 'Monday', 'Wednesday']

c)

['Monday', 'Tuesday', 'Wednesday']

d)

['Sunday', 'Monday', 'Tuesday']

105.

What will be the output of the following code snippet?

def is_even(number):

message = f"{number} is an even number" if number % 2 == 0 else f"{number} is an odd number" return message print(is_even(54))

a)

54 is an even number

b)

54 is an odd number

c)

number is an even number

d)

number is an odd number

106.

What will be the output of the following code snippet?

s = [1, 2, 3, 3, 2, 4, 5, 5]

print(s)

a)

[1, 2, 3, 4, 5]

b)

[1, 2, 3, 3, 2, 4, 5, 5]

c)

[1, 5]

d)

None

107.

What will be the output of the following code snippet?

from math import *

a = 2.19

b = 3.999999 c = -3.30

print(int(a), floor(b), ceil(c), fabs(c))

a)

2 3 -3 3.3

b)

3 4 -3 3

c)

2 3 -3 3

d)

2 3 -3 -3.3

108.

What will be the output of the following code snippet?

set1 = [1, 3, 5] set2 = [2, 4, 6]

print(len(set1 + set2))

a)

3

b)

6

c)

0

d)

error

109.

Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3],

what is list1 after list1.pop(1)?

a)

[3, 4, 5, 20, 5, 25, 1, 3]

b)

[1, 3, 3, 4, 5, 5, 20, 25]

c)

[3, 5, 20, 5, 25, 1, 3]

d)

[1, 3, 4, 5, 20, 5, 25]   

110.

What is the output of print 9//2?

a)

4.5

b)

4.0

c)

4

d)

none

111.

What is the output of the following program : 

a)

0

1

2

b)

0

1

2

3

c)

1

2

3

d)

none of these

112.

What data type is the object below ?

L = [1, 23, ‘hello’, 1]

a)

Dictionary

b)

Array

c)

Tuple

d)

List

113.

Which of the following function convert a string to a float in python?

a)

int(x [,base])

b)

float(x)

c)

long(x [,base] )

d)

str(x)

114.

What is the output of the following program : 

a)

8

b)

16

c)

Indentation Error

d)

Runtime Error

115.

What is the output of the following program : 

i = 0

while i < 3:

    print i

    i += 1

else:

    print 0

a)

0 1 2 3 0

b)

0 1 2 0

c)

0 1 2

d)

Error

116.

What is the output of the following program :

i = 0

while i < 5:

     print(i)

     i += 1

     if i == 3:

         break

else:

     print(0)

a)

0 1 2 0

b)

0 1 2

c)

Error

d)

None of the above

117.

What is the output of the following program?

x = 123

for i in x:

    print(i)

a)

1

b)

123

c)

0,1,2.....123

d)

error

118.

Information can be passed into functions as arguments.

a)

True

b)

False

119.

The onscreen pen that you use for drawing is called the

a)

screen

b)

function

c)

turtle

d)

python

120.

We can import Time in Edublocks.

a)

True

b)

Flase