by BlastRoom
Practice tracing Python for and while loops, including range().
#computer_science

30 questions
One question set, multiple game modes. Tap any game to see it in action. Not sure which to pick?
Answer to place stones and capture territory.
Outrun the snow together.
Earn blasts, then hunt the other team.
Answer to earn energy, then climb.

The class blasts through walls together.
Bid on mystery lots. Most money wins.
Sell tours. Nice, standard, or a total scam.
Answer, restock, and serve the rush.
More correct answers pulls the rope your way.
Answer, then shoot down the alien wave.
Answer, then tap to leap the frozen ridge.
What does this Python line display? print(list(range(4)))
What does this Python line display? print(list(range(2, 10, 2)))
What does this Python line display? print(list(range(10, 3, -2)))
Choose the list made by this Python expression. list(range(1, 8, 3))
What does this Python line display? print(list(range(-2, 3)))
What does this Python line display? print(list(range(5, -1, -2)))
How many times does this loop run its body? for i in range(5): print(i)
How many lines does this program display? for i in range(3, 9): print(i)
How many times does the print statement run? for i in range(2, 14, 3): print(i)
How many lines does this program display? for i in range(10, 4, -1): print(i)
How many times does this loop run? for i in range(-3, 4, 2): print(i)
How many lines does this program display? for i in range(1, 10, 4): print(i)
What does this program display, in order? for i in range(1, 4): print(i * 2)
What does this program display, in order? for i in range(3): print(i + 5)
What does this program display, in order? for i in range(2, 6): print(i * i)
What does this program display, in order? for i in range(5, 0, -2): print(i)
What does this program display? for i in range(1, 5): print("#" * i)
What does this program display, in order? for i in range(0, 7, 3): print(i - 1)
What does this program display? total = 0 count = 1 while count <= 4: total = total + count count = count + 1 print(total)
What does this program display? total = 5 number = 2 while number <= 5: total = total + number number = number + 1 print(total)
What does this program display? total = 0 count = 4 while count > 0: total = total + count count = count - 1 print(total)
What does this program display? total = 0 number = 1 while number <= 3: total = total + number * 2 number = number + 1 print(total)
What does this program display? total = 10 number = 0 while number < 4: total = total + number number = number + 1 print(total)
What does this program display? total = 0 number = 5 while number >= 2: total = total + number number = number - 2 print(total)
This program keeps printing "Go" until it is stopped. Why? count = 0 while count < 5: print("Go")
Why does this Python loop never stop? ready = True while ready: print("Working")
This loop never reaches its stopping condition. What is the problem? number = 4 while number > 0: print(number) number = number + 1
What does this program display? word = "go" for letter in word: print(letter)
What does this program display? word = "Hi" for letter in word: print(letter.lower())
What does this program display? word = "sun" for letter in word: print("*" + letter)
Crack the passcode before the zombies get in.
Answer, then swat bugs for bonus points.
Race through questions at your own speed.
Same question on every screen. Fastest wins.

Pick a tile, answer, hit bonuses and steals.
Python Lists and Strings
40 questions