NEW
Font size
WorksheetsLesson 31 Test-4
Total questions: 15
Worksheet time: 8mins
Single expression function is known as -
Recursive function
Anonymous function
monoexpression function
none
How many ways are there to import a module in python ?
0
1
2
3
Which of the python datatype contains unique elements ?
list
tuple
set
string
In python, for saving repeated writing we use -
function
loop
condition
function and loop
Which function is used to move the pointer ahead in the turtle module ?
ahead()
forward()
straight()
none
Which datatype is used for comparison-
==
=
<=
== and <=
Which of the python datatype is immutable ?
set
list
tuple
string
What will the output of the following code ?
def fun():
print(“hii”)
hi
hii
hiii
none
How many times print statement will execute?
2
3
4
5
What will be the output of the following code ?
1
3
5
none
Which function is used to move the pointer without drawing ?
goto()
penup()
pendown()
Both goto and penup
What will be the output of the following code ?
0
10
15
20
What will be the output of the following code?
18
20
16
26
What will be the output of the following code ?
x=[1,2,3,4,5,1,1,2,3]
y=set(x)
print(y)
[1,2,3,4,5,1,1,2,3]
[1,2,3,4,5]
[1,2,3,4,5,1]
none
Which of the output of the following code-
3
4
5
6
