wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Lesson 31 Test-4

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Single expression function is known as -

a)

Recursive function

b)

Anonymous function

c)

monoexpression function

d)

none

2.

How many ways are there to import a module in python ?

a)

0

b)

1

c)

2

d)

3

3.

Which of the python datatype contains unique elements ?

a)

list

b)

tuple

c)

set

d)

string

4.

In python, for saving repeated writing we use -

a)

function

b)

loop

c)

condition

d)

function and loop

5.

Which function is used to move the pointer ahead in the turtle module ?

a)

ahead()

b)

forward()

c)

straight()

d)

none

6.

Which datatype is used for comparison-

a)

==

b)

=

c)

<=

d)

== and <=

7.

Which of the python datatype is immutable ?

a)

set

b)

list

c)

tuple

d)

string

8.

What will the output of the following code ?

def fun():

print(“hii”)

a)

hi

b)

hii

c)

hiii

d)

none

9.

How many times print statement will execute?

a)

2

b)

3

c)

4

d)

5

10.

What will be the output of the following code ?

a)

1

b)

3

c)

5

d)

none

11.

Which function is used to move the pointer without drawing ?

a)

goto()

b)

penup()

c)

pendown()

d)

Both goto and penup

12.

What will be the output of the following code ?

a)

0

b)

10

c)

15

d)

20

13.

What will be the output of the following code?

a)

18

b)

20

c)

16

d)

26

14.

What will be the output of the following code ?

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

y=set(x)

print(y)

a)

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

b)

[1,2,3,4,5]

c)

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

d)

none

15.

Which of the output of the following code-

a)

3

b)

4

c)

5

d)

6