wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Alternating Turns

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What command in python creates a loop?

a)

which

b)

what

c)

while

d)

whatfor

2.

What command forces a loop to stop

a)

break

b)

but

c)

broke

d)

breaking

3.

How long will a loop continue

a)

As long as the condition is true

b)

Forever

4.

What are the 3 boolean conditions we can use?

a)

for, but, and

b)

or, and, but

c)

and, or, not

d)

but, for, not

5.

We have the values TRUE & FALSE. What do these mean?

a)

nothing

b)

basically on and off

6.

We've been learning about alternating turns. What BOOLEAN do we use to alternate turns between 2 players or 2 things?

a)

and

b)

or

c)

not

d)

but

7.

How would you alternate the turn for a variable called player_1?

a)

player_1 is not player_1

b)

player_1 = not player_1

c)

player_1 = player_2

d)

player_1 or not player_1

8.

How would you alternate between two different patterns? The variable is called plus.

a)

plus = not plus

b)

plus is not plus

c)

plus is not minus

d)

plus = not minus

9.

How would you alternate between 2 numbers? The variable is called number_1.

a)

number_1 is not number_1

b)

number_1 = False

c)

number_1 or not number_1

d)

number_1 = not number_1

10.

What would the output for this code be:

a)

The 2 patterns 1 time.

b)

The 2 patterns forever.

c)

The 2 patterns 10 times.

d)

Nothing.