wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Level1

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

Who developed the Python language?

a)

Zim Den

b)

Guido van Rossum

c)

Niene Stom

d)

Wick van Rossum

2.

Which one of the following is the correct extension of the Python file?

a)

.py

b)

.python

c)

.p

d)

None of these

3.

What do we use to define a block of code in Python language?

a)

Key

b)

Brackets

c)

Indentation

d)

None of these

4.

Which character is used in Python to make a single line comment?

a)

/

b)

//

c)

#

d)

!

5.

Which of the following declarations is incorrect?

a)

_x = 2

b)

__x = 3

c)

__xyz__ = 5

d)

None of these

6.

Which of the following operators is the correct option for power(ab)?

a)

a ^ b

b)

a**b

c)

a ^ ^ b

d)

a ^ * b

7.

Study the following function:

import math

print(math.sqrt(36))

What will be the output of this code?

a)

Error

b)

-6

c)

6

d)

6.0

8.

Which of the following option is not a core data type in the python language?

a)

Dictionary

b)

Lists

c)

Class

d)

All of the above

9.

What happens when '2' == 2 is executed?

a)

False

b)

Ture

c)

ValueError occurs

d)

TypeError occurs

10.

Study the following statement

z = {"x":0, "y":1}

Which of the following is the correct statement?

a)

x dictionary z is created

b)

x and y are the keys of dictionary z

c)

0 and 1 are the values of dictionary z

d)

All of the above

11.

Study the following program:

i = 2, 10

j = 3, 5

add = i + j

print(add)

What will be the output of this program?

a)

(5, 10)

b)

20

c)

(2, 10, 3, 5)

d)

SyntaxError: invalid syntax