wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Programming Quiz

Total questions: 20

Worksheet time: 20mins

Name
Class
Date
1.

Python is widely used for:

a)

Web development

b)

Data science

c)

Automation

d)

All of the above

2.

Which of the following is NOT a common use of Python?

a)

Game development

b)

Machine learning

c)

Operating system kernel design

d)

Web applications

3.

Python is popular mainly because it is:

a)

Very fast

b)

Easy to learn and readable

c)

Hardware dependent

d)

Low-level language

4.

Which Python library is commonly used for data analysis?

a)

NumPy

b)

Pandas

c)

Matplotlib

d)

All of the above

5.

What is the output of type(10)?

a)

int

b)

float

c)

str

d)

bool

6.

Which data type is used to store text in Python?

a)

char

b)

string

c)

str

d)

text

7.

Which data type is immutable?

a)

list

b)

dictionary

c)

set

d)

tuple

8.

Which data type stores key-value pairs?

a)

list

b)

tuple

c)

set

d)

dictionary

9.

Which data type does not allow duplicate values?

a)

list

b)

tuple

c)

set

d)

string

10.

What is the output of type(True)?

a)

int

b)

bool

c)

str

d)

float

11.

Which of the following is a numeric data type?

a)

int

b)

float

c)

complex

d)

All of the above

12.

Which data type is used to store multiple items in a single variable?

a)

int

b)

float

c)

list

d)

bool

13.

Which operator is used to find remainder?

a)

/

b)

//

c)

%

d)

**

14.

What does ** operator do?

a)

Division

b)

Multiplication

c)

Exponentiation

d)

Modulus

15.

Which statement is used for decision making?

a)

for

b)

while

c)

if

d)

break

16.

Which keyword is used to exit a loop?

a)

stop

b)

exit

c)

break

d)

pass

17.

Which keyword is used for multiple conditions?

a)

if

b)

else

c)

elif

d)

switch

18.

Which operator performs bitwise OR?

a)

||

b)

or

c)

|

d)

^

19.

Which operator is used for left shift?

a)

>>

b)

<<

c)

<<<

d)

<

20.

What is the result of 8 << 2?

a)

16

b)

32

c)

4

d)

8