wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Conditions

Total questions: 15

Worksheet time: 16mins

Name
Class
Date
1.

What boolean data are there in Python?

a)

True

b)

False

c)

1

d)

0

2.

What do relational operators do?

a)

Compare data

b)

Join expressions

c)

Assign and operate variables

d)

Add new items to old variables

3.

The relation operator of "not equal to"

a)

¡=

b)

!=

c)

==

d)

Not =

4.

Which one is correct?

a)

=>

b)

>=

5.

what is the word that establishes the condition on Python?

a)

"si"

b)

"da"

c)

"yes"

d)

"if"

6.

Write down a code that establishes the next condition.

If my_favorite_game is not "The Legend of Zelda" then print "In correct, my favorite game is "The Legend of Zelda"

4 lines
7.

On Python, only one condition can be established.

a)

True, we can only establish one condition.

b)

True, more than one condition makes the code crash.

c)

False, more than one condition is possible.

8.

What "word" should I use if my first condition is false?

a)

"if"

b)

"elif"

c)

"else if"

d)

"another if"

9.

If all of my conditions fail, what would should I use?

a)

"else"

b)

"break"

c)

"stop"

d)

"otherwise"

10.

Write down a short code where you use "if", "elif", and "else".

4 lines
11.

How can you say in Python, This number is greater than this number?

a)

a <= b

b)

a >= b

c)

a == b

d)

a != b

12.

How can you say in Python, This number is less than this number?

a)

a <= b

b)

a >= b

c)

a == b

d)

a != b

13.

How can you say in Python, This number is equal to this number?

a)

a <= b

b)

a >= b

c)

a == b

d)

a != b

14.

Write down a code where you use the logical operator "not"

4 lines
15.

What logical operator would represent this truth table?

F + F = F

F + T = T

T + F = T

T + T = T

a)

And

b)

Or

c)

True