Font size
WorksheetsBrightchamps:Edublocks
Total questions: 120
Worksheet time: 1hrs 7mins
Algorithm is a (a) stage of a coding.
Name the variable in this code .
(a)
Algorithm is a unique set of instructions and there is only one type of algorithm for a particular task.
True
False
What will be the angle of turn to draw a Hexagon in the turtle screen ?
60
62
6
360/7
How many variables will be required to find the area of a cube ?
1
2
3
4
Which loop is used in the following Output of a program?
while
for
if
forever
Iteration done on the number of alphabets in a Dictionary will use which kind of flow control statement?
until
while
for
forever
How many variables are there in this ?
3
4
2
5
What makes the function more defined?
Function inside function
Function with arguments
Function inside loop
None of the above
Which one of the following used to store data in a "LAST IN FIRST OUT" manner
Local Variables
Tuples
Lists
Turtle
Lists are Heterogeneous type of storage?
False
True
May be
What will be the result of this input?
Circle with one color
Circle with two color
Hexagon with one color
Circular Hexagon
What is the output of the following program : print((1.3, 9) + (2.4, 14))
(10.3)(16.4)
1.3,9+2.4,14
26.7
(1.3,9,2.4,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])
edu,2022,4,6
edu
2022
4
6
[edu,2022,4,6]
error
If y=100, then float(y) will give the output as ?
100
100.00
100.0
100.000
Will the shown blocks are enough to launch a turtle screen?
Yes
No
The shown block will let
print two strings one after another
print two strings one below another
print one string and one integer together
Print one string and one integer one below another
How many types of switch cases are there in total?
6
7
5
3
Import time block is responsible for making the
Time go fast
To let time block work in anyway
nothing related to time
Time go slow
In which of the following loop in python, we can check the condition ?
if
while
for
for and if both
For i in range(-3), how many times this loop will run and print the next statement?
4
3
depends upon the value of i
invalid , will show error
What is displayed by this code?
0
1
0+1
Mynumber
What should be there at the ?? to draw a circle ?
90
60
360/3
120
EduBlocks was developed by Joshua Lowe
Van Rossum
Joshua Lowe
Which keyword is used for function ?
Fun
Define
Def
Function
What is the use of Turtle?
Gives Drawing space
Gives area for writing
Gives area for coding
none of the above
100 mod(%)50 =
0
10
10
2
25 mod(%) 12=
0
1
10
none of the above
While loop works exactly like (a) loop in Scratch.
'For' loop iterate over the items of a list and string.
True
False
(a) are one of the most versatile data storage used in Python.
Lists can have fixed number of items.
True
False
List is a kind of (a)
Append function in list will be used to
add the element in a list
add the element at the end of the list
add the element in a particular index of a list
none of the above
_____ function is used to add another list inside the list.
append
extend
insert
add
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?
remove
pop
append
delete
list1 = [1, 3]
list2 = list1
list1[0] = 4
print(list2)
The Output will be :
[1, 4]
[1, 3, 4]
[4, 3]
[1, 3]
Which one of the following is the use of function in python?
Functions don’t provide better modularity for your application
you can’t also create your own functions
Functions are reusable pieces of programs
All of the mentioned
Which of the following Python statements will result in the output: 6?
A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
A[2][1]
A[1][2]
A[3][2]
A[2][3]
What is the difference between both the commands?
1. used for calling a list
2. used to get an array
1. used to get an array
2. used for calling a list
1. used for calling a list
2. used to get myList
none of the above
Remove function is used to remove the particular element from the list.
True
False
What will be the output ?
[1, 2, 3, 3 ,8, 4]
[1, 2, 8, 3, 4]
[1, 2, 3, 4, 3 ,8]
[1, 2, 3, 8, 4]
What do we call this 'n' in this figure?
n
function
parameter
argument
What is output of print(math.pow(3, 2))?
8
9
none
9.0
What is the Boolean output of print 0.1 + 0.2 == 0.3?
True
False
Depends on the platform
None of the above
Guess the output.
none of the above
The (a) in python are used to combine TRUE and FALSE values of variables.
Consider the following and mark the statement as per Logical Operator Category: ( And, Or, Not )
1. AND
2. OR
3. NOT
1. AND
2. AND
3. NOT
1. OR
2. AND
3. NOT
1. OR
2. AND
3. AND
____ is also known as non positive and non negative number.
1
any variable
0
none of the above
Which of the following loops has a more rigid syntax?
For
While
Until
None
Mathematical operations can be performed on a string.
True
False
What is the answer to this expression, 22 % 3 is?
8
7
0
1
What is the order of precedence in python?
i) Parentheses
ii) Exponential
iii) Multiplication
iv) Division
v) Subtraction
vi) Addition
i,ii,iii,iv,v,vi
i,ii,iii,iv,vi,v
ii,i,iii,iv,v,vi
ii,i,iv,iii,v,vi
What is the correct sequence to create a FOR loop ?
Initialization,
Increment , Expression,
Initialization, Increment,
Expression
Initialization, Expression, Increment
none
Choose the correct option for the flow control statements.
for, while , else ,elif , if elif, elif, if else
for, while, if elif , else, if else, elif
while, for, if elif, if, else, elif
for, while if elif, else, elif, if else
What is the RGB color sequence of Black color ?
0,255,0
0,0,255
0,0,0
255,0,0
As soon as you create a list , it shows up in which Block ?
List
myList
Variable
Logic
Name the blocks used in this code .
Statements, Maths
Logic , Statements
Statement, loops
Loops , logic
Which of the following is invalid?
_a = 1
__a = 1
__str__ = 1
none of the mentioned
All keywords in Python are in _________
lower case
UPPER CASE
Capitalized
None of the mentioned
What will be the output ?
0
1
1
2
error
0.0
1.1
What is the output when we execute list(“hello”)?
[‘olleh’]
[‘hello’]
[‘llo’]
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]
[2, 33, 222, 14]
Error
25
[25, 14, 222, 33, 2]
What will be the output of the following Python code?
a=[1,2,3]
b=a.append(4)
print(b)
1,2,3,4,5
[1,2,3,4]
[1,2,3,1]
None
The views available in Edublocks are:
Text on the blocks
Python view
Cross-Platform
All of the above
What does Turtle uses for graphics?
inter
tkinter
tinker
kinter
Turtle comes with Python’s Standard Library.
True
False
Name the 6 different types of flow control statements available in Python:
Python is the only language that can use (a) within for a loop.
The two kinds of loop structures are ____ and _____
(a)
Which loop has a definite iteration ?
if
for
while
if else
(a) is simply a “chunk” of code that you can use over and over again, rather than writing it out multiple times.
The data that you can pass into a function is called
argument
function
parameter
none
Information can be passed into functions as
parameters
arguments
functions
none
Arguments are specified after the function name, inside the parentheses.
true
false
We can add any number of arguments in a function inside the parentheses. For this you can use
.
,
/
"
Functions in python only runs when it is called.
true
false
A list is an ordered and immutable Python container.
false
true
Which of the following operator is a unary operator?
and
or
not
none
For TRUE AND TRUE , the result will be
True
False
None
What is the correct syntax for importing the turtle ?
from turtle import *
import turtle*
import from turtle*
none of the above
What will be the output of this code ?
Black screen
Error
Invalid syntax
Blank White screen
What will be the output of this?
turtle.left(50) will do
move left by 50 steps
move left by 50 degree
turn left by 50 degree
Invalid
Which kind of loop will be used to get the Greatest number out of 3 numbers ?
if loop
nested if else
nested if
for loop
Which one is not a valid loop in Edublocks
if
else if
elif
What are the two ways to terminate the While condition ?
break , false
true , false
break, stop
break, jump
If we define 2 parameters in a definition and pass 3 arguments , will it work ?
Yes
No
What will be the datatype of the var in the below code ?
var = 10
print(type(var))
var = "Hello"
print(type(var))
str and int
int and int
str and str
int and str
How is a code block indicated in Python?
Brackets.
Indentation.
Key.
None of the above.
.
What will be the output of the following code ?
print(type(5 / 2))
print(type(5 // 2))
float and int
int and float
float and float
int and int
.
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)
20
0
15
none of these
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
0 3 6 9 12
0 1 2 ….. 15
Infinite Loop
0 3 6 9 12 15
Which of the following concepts is not a part of Python?
Pointers
loops
functions
turtle
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))
100
20
50
10
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)
[2, 4, 6]. [2, 4, 6]
[2, 4, 6], [1, 3, 5]
[1. 3. 5], [1, 3, 5]
None of these.
What will be the output of the following code snippet?
a = 3 b = 1
print(a, b)
a, b = b, a
print(a, b)
1 3 1 3
3 1 3 1
3 1 1 3
1 3 3 1
Which of the following types of loops are not supported in Python?
for
while
do-while
None of the above
Which of the following is the proper syntax to check if a particular element is present in a list?
if ele in list
if not ele not in list
Both A and B
None of the above
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)
thrive
neither
three
five
What will be the output of the following code snippet?
def check(a):
print("Even" if a % 2 == 0 else "Odd")
check(12)
even
odd
error
none
What will be the output of the following code snippet?
example = ["Sunday", "Monday", "Tuesday", "Wednesday"]; print(example[-3:-1])
['Wednesday', 'Monday']
['Sunday', 'Monday']
['Tuesday', 'Wednesday']
['Monday', 'Tuesday']
What will be the output of the following code snippet?
a = [1, 2]
print(a * 3)
[1, 2]
[1, 2, 1, 2]
[1, 2, 1, 2, 1, 2]
Error
What will be the output of the following code snippet?
example = ["Sunday", "Monday", "Tuesday", "Wednesday"];
del example[2]
print(example)
['Sunday', 'Monday', 'Tuesday', 'Wednesday']
['Sunday', 'Monday', 'Wednesday']
['Monday', 'Tuesday', 'Wednesday']
['Sunday', 'Monday', 'Tuesday']
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))
54 is an even number
54 is an odd number
number is an even number
number is an odd number
What will be the output of the following code snippet?
s = [1, 2, 3, 3, 2, 4, 5, 5]
print(s)
[1, 2, 3, 4, 5]
[1, 2, 3, 3, 2, 4, 5, 5]
[1, 5]
None
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))
2 3 -3 3.3
3 4 -3 3
2 3 -3 3
2 3 -3 -3.3
What will be the output of the following code snippet?
set1 = [1, 3, 5] set2 = [2, 4, 6]
print(len(set1 + set2))
3
6
0
error
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3],
what is list1 after list1.pop(1)?
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[3, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]
What is the output of print 9//2?
4.5
4.0
4
none
What is the output of the following program :
0
1
2
0
1
2
3
1
2
3
none of these
What data type is the object below ?
L = [1, 23, ‘hello’, 1]
Dictionary
Array
Tuple
List
Which of the following function convert a string to a float in python?
int(x [,base])
float(x)
long(x [,base] )
str(x)
What is the output of the following program :
8
16
Indentation Error
Runtime Error
What is the output of the following program :
i = 0
while i < 3:
print i
i += 1
else:
print 0
0 1 2 3 0
0 1 2 0
0 1 2
Error
What is the output of the following program :
i = 0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)
0 1 2 0
0 1 2
Error
None of the above
What is the output of the following program?
x = 123
for i in x:
print(i)
1
123
0,1,2.....123
error
Information can be passed into functions as arguments.
True
False
The onscreen pen that you use for drawing is called the
screen
function
turtle
python
We can import Time in Edublocks.
True
Flase
