Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Operators Quiz

Total questions: 29

Worksheet time: 15mins

Name
Class
Date
1.

Which of the following is an arithmetic operator?

a)

and

b)

+

c)

=

d)

not

2.

Which operator is used for exponent (power) in Python?

a)

^

b)

**

c)

//

d)

%

3.

The operator % is used to find:

a)

Quotient

b)

Product

c)

Remainder

d)

Sum

4.

Which of the following is a comparison operator?

a)

==

b)

=

c)

+

d)

*

5.

Which operator is used for integer (floor) division?

a)

/

b)

//

c)

%

d)

*

6.

Which of the following is a logical operator?

a)

+

b)

not

c)

%

d)

*

7.

What symbol is used for “not equal to”?

a)

=

b)

==

c)

!=

d)

=

8.

What is the result of 5 + 3 * 2?

a)

16

b)

11

c)

10

d)

8

9.

Which operator has the highest precedence?

a)

+

b)

*

c)

**

d)

%

10.

What is the result of 10 // 3?

a)

3

b)

3.33

c)

1

d)

4

11.

Which statement is used for decision making?

a)

while

b)

for

c)

if

d)

print

12.

What type of operator is >=?

a)

Arithmetic

b)

Comparison

c)

Logical

d)

Assignment

13.

Which of these is a control statement?

a)

print()

b)

if

c)

input()

d)

int()

14.

Which of the following is used for looping?

a)

if

b)

else

c)

while

d)

break

15.

The operator not is used to:

a)

Multiply

b)

Reverse a condition

c)

Compare

d)

Divide

16.

In if-else, which part runs when the condition is false?

a)

if block

b)

else block

c)

print block

d)

none

17.

What is the result of 12 % 5?

a)

2

b)

3

c)

4

d)

1

18.

Which operator checks if two values are equal?

a)

=

b)

==

c)

!=

d)

>=

19.

Which statement is NOT a control statement?

a)

Sequential

b)

Conditional

c)

Looping

d)

Arithmetic

20.

The operator used for subtraction is:

a)

/

b)

-

c)

*

d)

+

21.

Operator precedence decides:

a)

Variable names

b)

Order of operations

c)

Data types

d)

Speed of Python

22.

What is the output of 3 ** 2?

a)

5

b)

6

c)

9

d)

8

23.

Which operator is used for multiplication?

a)

+

b)

*

c)

/

d)

%

24.

What type of statement is if-elif-else?

a)

Looping

b)

Conditional

c)

Arithmetic

d)

Error-checking

25.

Which operator is used to join two conditions?

a)

and

b)

+

c)

=

d)

%

26.

What will be the result of 20 / 4?

a)

5

b)

4.0

c)

5.0

d)

4

27.

The operator <= means:

a)

less than

b)

greater than

c)

less than or equal to

d)

equal to

28.

Which control statement repeats a block of code?

a)

if

b)

else

c)

while

d)

break

29.

What is the result of 10 - 3 * 2?

a)

14

b)

4

c)

2

d)

6