by BlastRoom
Trace counted and condition-controlled loops to determine their behavior.
#computer_science

40 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.
How many times does this loop body run? SET i TO 3 REPEAT UNTIL i > 12 DISPLAY i SET i TO i + 3
How many iterations occur? The bounds of the FOR line are both included. FOR item FROM 0 TO 6 DISPLAY item
How many times is "Ready" displayed? REPEAT 5 TIMES DISPLAY "Ready"
How many times does this loop body run? The bounds of the FOR line are both included. FOR score FROM 2 TO 10 DISPLAY score * 2
How many times does this loop display points? SET points TO 15 REPEAT WHILE points > 3 DISPLAY points SET points TO points - 4
How many times does this loop body run? SET score TO 2 REPEAT UNTIL score >= 20 DISPLAY score SET score TO score + 6
How many iterations occur? The bounds of the FOR line are both included. FOR page FROM 5 TO 5 DISPLAY page
How many times does this loop body run? SET k TO 1 REPEAT WHILE k < 16 DISPLAY k SET k TO k * 2
How many times is temperature displayed? SET temperature TO 12 REPEAT UNTIL temperature <= 0 DISPLAY temperature SET temperature TO temperature - 3
How many iterations occur? FOR page FROM 8 TO 12 DISPLAY page
What does this loop display, in order? The bounds of the FOR line are both included. FOR count FROM 1 TO 4 DISPLAY count * count
What does this loop display, in order? FOR n FROM 2 TO 5 DISPLAY n + 1
What does this loop display, in order? SET total TO 0 FOR number FROM 1 TO 3 SET total TO total + number DISPLAY total
What does this loop display, in order? FOR n FROM 1 TO 4 DISPLAY n * 3
What does this loop display, in order? FOR n FROM 4 TO 7 DISPLAY n MOD 2
What does this loop display, in order? FOR letter FROM 1 TO 3 DISPLAY "Go" + letter
What does this loop display, in order? SET value TO 1 REPEAT 3 TIMES SET value TO value * 2 DISPLAY value
DIV divides and discards any remainder. What does this loop display, in order? FOR n FROM 3 TO 6 DISPLAY n DIV 2
What does this loop display, in order? SET counter TO 10 REPEAT 3 TIMES DISPLAY counter SET counter TO counter - 1
What does this loop display, in order? FOR index FROM 1 TO 4 DISPLAY index * index - index
DIV divides and discards any remainder. What does the last line display? SET n TO 40 SET steps TO 0 REPEAT WHILE n > 1 SET n TO n DIV 2 SET steps TO steps + 1 DISPLAY steps
What does the last line display? SET i TO 2 REPEAT WHILE i < 15 SET i TO i + 3 DISPLAY i
What does the last line display? SET tickets TO 20 REPEAT WHILE tickets > 0 SET tickets TO tickets - 4 DISPLAY tickets
What does the last line display? SET x TO 1 REPEAT WHILE x <= 20 SET x TO x * 3 DISPLAY x
What does the last line display? SET position TO 0 REPEAT WHILE position < 4 SET position TO position + 1 DISPLAY position
DIV divides and discards any remainder. What does the last line display? SET meter TO 18 REPEAT WHILE meter > 2 SET meter TO meter DIV 3 DISPLAY meter
What does the last line display? SET count TO 7 REPEAT WHILE count > 0 SET count TO count - 2 DISPLAY count
DIV divides and discards any remainder. What does the last line display? SET i TO 10 REPEAT WHILE i >= 1 SET i TO i DIV 2 DISPLAY i
What happens when this loop runs? SET count TO 10 REPEAT WHILE count > 0 DISPLAY count SET count TO count + 1
Which statement correctly describes this loop? SET i TO 1 REPEAT WHILE i < 5 DISPLAY i
What happens when this loop runs? SET level TO 1 REPEAT WHILE level < 4 DISPLAY level SET level TO 1
DIV divides and discards any remainder. What happens when this loop runs? SET n TO 1 REPEAT WHILE n > 0 DISPLAY n SET n TO n DIV 1
What happens when this loop runs? SET done TO false REPEAT WHILE NOT done DISPLAY "Working"
Which statement correctly describes this loop? SET temperature TO 0 REPEAT WHILE temperature <= 20 DISPLAY temperature SET temperature TO temperature - 2
The loop body is DISPLAY n * 10, and the program must display 10, 20, 30, 40, 50 in that order. The bounds of a FOR line are both included. Which header does that?
The loop body is DISPLAY item * 2. Which header displays 6, 8, 10, 12 in that order?
The loop body is DISPLAY level - 1. Which header displays 0, 1, 2, 3 in that order?
The loop body is DISPLAY n MOD 3. Which header displays 1, 2, 0, 1 in that order?
The loop body is DISPLAY "Row " + r. Which header displays Row 2, Row 3, Row 4, Row 5 in that order?
The loop body is DISPLAY value * value. Which header displays 4, 9, 16 in that order?
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.
Lists and Indexes
40 questions