Math
For Loops
While Loops
Conditionals
100

what is the result of 16 / 5 ?

3.2

100

What is the value of 'x' after the following Python code has completed executing?


x = 1

for n in range(5):

     x = x + 2

11

100

Where have we used a while loop in our Vampire Pizza Attack code?

In the game loop, using the game_running variable.

100

Do we play the game with this code?

game_running = False

if game_running:

     game()

No

200

what is the result of 17 % 5 ?

2

200

What is the value of z after the following code has run?

z = "Animals in the zoo: "

x = 4

for n in range(4):

    x +=1

z += str(x)

Animals in the zoo: 8

200

What type of variable - which only has two possible options - do while loops rely on?

Booleans

200

What are the two main conditional keywords that we use in code?

If, Else

300

what is the result of 16 // 5 ?

3

300

What is the value of the x after the following code has run?

x=0

for i in range(5):

     x += i

15

300

What is the value of x after the following code has run?

x = 3

while x < 8:

     x += 2


9

300

What is the value of 'type' after the following code has run?

x = 5

if x < 10:

     x += 10

if x > 10:

     x -= 5

10

400

What is the result of ((2*5)%4)+1?

3

400

What is the value of 'x' after the following Python code has completed executing?

words = ["Coding ", " Is ", " Fun"]
x = ""

for w in words:

     x += w

"Coding Is Fun"

400

What is the value of x after the following code has run?

x = 3

while x < 8:

     x += 2

9

400

What is the value of 'type' after the following code has run?

x = 15

type = " "

if x % 2 == 0:

     type = "even"

else:

     type = "odd"

odd

500

what is the result of (8 % 5) // (11 % 3) ?

1

500

What is the value of 'x' after the following Python code has completed executing?


x = 10

for n in range(2):

     for m in range (3):

          x += 2

22

500

What is the value of x after the following code has run?

x=2

while x<8:

     x+=1

     while x<4:

          x+=1



8

500

What is the value of x after the following code has run?

x = 0

for n in range(5):

    if x < 8:

         x += 5

    else:

         x += 10


40

M
e
n
u