wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Operators

Total questions: 19

Worksheet time: 10mins

Name
Class
Date
1.

What is the result of 5 + 3 * 8 -2?

a)

25

b)

20

c)

22

d)

None of the options

2.

Which operator is used for greater than comparison?

a)

>

b)

<==

c)

=

d)

<=

e)

!=

3.

What is the result of True and False?

a)

True

b)

None

c)

Invalid

d)

False

4.

What is the assignment operator for adding and assigning in Python?

a)

+=

b)

-=

c)

*=

d)

++

5.

Which operator is used to compare if two variables are pointing to the same object?

a)

same

b)

equals

c)

===

d)

is

6.

What is the result of 10 | 4?

a)

6

b)

16

c)

12

d)

14

7.

What is the result of print (8 / 2) in python?

a)

None of the goven options

b)

4

c)

3

d)

2

8.

Which operator is used for less than or equal to comparison?

a)

<

b)

=>

c)

<>

d)

<=

9.

What is the result of True or False?

a)

Banana

b)

True

c)

Purple

d)

Maybe

10.

What is the assignment operator for dividing and assigning in Python?

a)

/=

b)

div=

c)

/

d)

//

11.

Which operator is used to check if two variables are not pointing to the same object?

a)

>

b)

==

c)

<

d)

!=

12.

What is the result of 5 & 3?

a)

4

b)

6

c)

2

d)

1

13.

What is the result of 7 * 2?

a)

5

b)

14

c)

21

d)

10

14.

Which operator is used for equal to comparison?

a)

==

b)

><

c)

<>

d)

!=

15.

What is the result of not True?

a)

False

b)

Maybe

c)

True

d)

Unknown

16.

What is the assignment operator for subtracting and assigning in Python?

a)

-/

b)

-*

c)

-=

d)

-+

17.

Which operator is used to check if a value exists in a sequence?

a)

at

b)

to

c)

on

d)

in

18.

What is the result of 12 ^ 5?

a)

248822

b)

248822

c)

248832

d)

248822

19.

What is the result of 9 % 4?

a)

3

b)

2

c)

5

d)

1