Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Operator Precedence

Total questions: 9

Worksheet time: 5mins

Name
Class
Date
1.

The value of variable bmi would be

a)

26.23

b)

94.4

c)

2229.7

2.

For the given values of variables

  • qual
  • exp
  • Will the text "Qualified for the job" be printed or not ?
a)

Yes

b)

No

3.

A teenager is one whose age is in between 13 and 19.

Which of the following statements correctly capture the condition.

a)

if age >=13 and age <=19 :

print ( "teenager")

b)

if age >13 and age <19 :

print ( "teenager")

c)

if age >=13 && age <=19 :

print ( "teenager")

d)

if age >13 && age <19 :

print ( "teenager")

4.

13 // 5


The result of the above code expression will be

a)

2

b)

3

c)

2.6

5.

13 % 5


The result of the above code expression will be

a)

3

b)

2

c)

2.6

6.

2 ** (2 + 3 )


The result of the above code expression will be

a)

32

b)

8

c)

10

7.

True and False


The result of the above code expression will be

a)

False

b)

True

c)

Syntax error

8.

True or False


The result of the above code expression will be

a)

True

b)

False

c)

Syntax error

9.

x = 3


Which of the following expression evaluates to True

a)

x == 3

b)

not x == 3

c)

not not x == 3

d)

x != 3

e)

not x != 3