wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python - True or False?

Total questions: 14

Worksheet time: 5mins

Name
Class
Date
1.

What does this if statement evaluate to?

height = 148

if height > 120:

...

a)

True

b)

False

2.

What does this if statement evaluate to?

height = 118

if height > 120:

...

a)

True

b)

False

3.

What does this if statement evaluate to?

height = 120

if height > 120:

...

a)

True

b)

False

4.

What does this if statement evaluate to?

message = "Hi"

if message != "hi":

...

a)

True

b)

False

5.

What does this if statement evaluate to?

message = 'hello'

if message == "hello":

...

a)

True

b)

False

6.

What does this if statement evaluate to?

points = 12

points += 5

if points >= "15":

...

a)

True

b)

False

7.

What does this if statement evaluate to?

points = 12

points += 5

if points == 17:

...

a)

True

b)

False

8.

What does this if statement evaluate to?

message = "Kia ora"

if message:

...

a)

True

b)

False

9.

What does this if statement evaluate to?

discount = 10

if discount:

...

a)

True

b)

False

10.

What does this if statement evaluate to?

username = ""

if username:

...

a)

True

b)

False

11.

What does this if statement evaluate to?

points = 0

if points:

...

a)

True

b)

False

12.

What does this if statement evaluate to?

username = " "

if username:

...

a)

True

b)

False

13.

What does this if statement evaluate to?

username = "Michael"

age = 34

if username == "Michael" or age <= 20:

...

a)

True

b)

False

14.

What does this if statement evaluate to?

username = "Michael"

age = 34

if username == "Michael" and age <= 20:

...

a)

True

b)

False