NEW
Font size
WorksheetsPython Alternating Turns
Total questions: 10
Worksheet time: 5mins
What command in python creates a loop?
which
what
while
whatfor
What command forces a loop to stop
break
but
broke
breaking
How long will a loop continue
As long as the condition is true
Forever
What are the 3 boolean conditions we can use?
for, but, and
or, and, but
and, or, not
but, for, not
We have the values TRUE & FALSE. What do these mean?
nothing
basically on and off
We've been learning about alternating turns. What BOOLEAN do we use to alternate turns between 2 players or 2 things?
and
or
not
but
How would you alternate the turn for a variable called player_1?
player_1 is not player_1
player_1 = not player_1
player_1 = player_2
player_1 or not player_1
How would you alternate between two different patterns? The variable is called plus.
plus = not plus
plus is not plus
plus is not minus
plus = not minus
How would you alternate between 2 numbers? The variable is called number_1.
number_1 is not number_1
number_1 = False
number_1 or not number_1
number_1 = not number_1
What would the output for this code be:
The 2 patterns 1 time.
The 2 patterns forever.
The 2 patterns 10 times.
Nothing.
