wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Revision

Total questions: 15

Worksheet time: 7mins

Name
Class
Date
1.

Which of the following is a correct identifier?

a)

My-Name

b)

True

c)

2ndName

d)

S_name

2.

(a)   literals represent True or False.

3.

Which out of the following is an identity operator?

a)

is

b)

not

c)

or

d)

not in

4.

Which out of the following is a logical operator?

a)

in

b)

not

c)

not in

d)

is not

5.

What will be the output of 14%4 :

a)

2.0

b)

2

c)

3

d)

3.0

6.

Find the output of 2**3?

a)

6

b)

6.0

c)

8

d)

8.0

7.

Write the type of token for the following:''True': (a)  

8.

Which one is a mutable type?

a)

Integer

b)

String

c)

Tuple

d)

List

9.

The smallest individual unit in a program is known as a (a)   .

10.

Python takes ______indented spaces after the function declaration statement by default.

a)

5

b)

6

c)

4

d)

3

11.

Identify the data type: [10,40,80,90]

a)

List

b)

Tuple

c)

Dictionary

d)

String

12.

The result of print(4<5) is _________

a)

False

b)

True

c)

None

d)

Error

13.

The data type of ”123” is ___________.

a)

integer

b)

List

c)

String

d)

Tuple

14.

(a)   Statement terminates the loop.

15.

The output of range(5) will be:

a)

range(0,5)

b)

range(0,4)

c)

[0,1,2,3,4]

d)

[1,2,3,4,5]