by BlastRoom
Review core programming concepts through code tracing and debugging.
#computer_science

50 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.
Trace this pseudocode: SET score TO 10 / SET bonus TO 4 / SET score TO score + bonus / SET bonus TO 0. What does score hold at the end?
Trace this pseudocode: SET first TO 2 / SET second TO 9 / SET first TO second / SET second TO first. What does second hold at the end?
Trace this pseudocode: SET lives TO 3 / SET lives TO lives - 1 / SET lives TO lives + 2. What is the final value of lives?
A program runs: SET distance TO 12 / SET distance TO distance + 8 / SET distance TO distance - 5. What value is stored in distance?
Trace this pseudocode: SET count TO 1 / SET count TO count * 4 / SET saved TO count. What does saved hold?
Trace this pseudocode: SET x TO 5 / SET y TO x + 2 / SET x TO y + 1. What does x hold when the program ends?
A variable stores the value 'False' including the quotation marks. What data type is the value?
What data type is the value 42?
What data type is the value 3.14?
What data type is [4, 7, 9]?
SET result TO 8 > 4. What data type does result store?
In this pseudocode, DIV is integer division and MOD gives the remainder. What is 29 DIV 6 + 29 MOD 6?
What is the value of (8 + 4) * 3 - 5?
In this pseudocode, MOD gives the remainder. What is (17 MOD 5) * 2?
In this pseudocode, DIV is integer division. What is 20 DIV 3 * 3?
What is the value of 5 + 2 * 4?
In this pseudocode, DIV is integer division. What is (14 - 5) DIV 2?
Trace this pseudocode with score holding 88: IF score >= 90 THEN OUTPUT 'A' ELSE IF score >= 80 THEN OUTPUT 'B' ELSE OUTPUT 'C' END IF. What is printed?
Trace this pseudocode with age holding 14: IF age >= 16 THEN OUTPUT 'driver' ELSE IF age >= 13 THEN OUTPUT 'teen' ELSE OUTPUT 'child' END IF. What is printed?
Trace this pseudocode with number holding -3: IF number > 0 THEN OUTPUT 'positive' ELSE IF number = 0 THEN OUTPUT 'zero' ELSE OUTPUT 'negative' END IF. What is printed?
A program runs: IF items >= 5 THEN OUTPUT 'discount' ELSE OUTPUT 'regular price' END IF. What is printed when items holds 5?
Trace this pseudocode with level holding 2: IF level = 1 THEN OUTPUT 'beginner' ELSE IF level = 2 THEN OUTPUT 'intermediate' ELSE OUTPUT 'advanced' END IF. What is printed?
Trace this pseudocode with temperature holding 30: IF temperature < 0 THEN OUTPUT 'ice' ELSE IF temperature < 25 THEN OUTPUT 'cool' ELSE OUTPUT 'warm' END IF. What is printed?
Rain is True and windy is False. Which expression evaluates to True?
A holds 8 and B holds 12. Which expression evaluates to True?
signedIn is True and paid is False. Which expression evaluates to True?
hasPass is False and isGuest is True. Which expression evaluates to True?
Temperature is 22 and sunny is True. Which expression evaluates to True?
A program has ready set to True and error set to False. Which expression evaluates to True?
How many times does this loop body run? FOR count FROM 2 TO 10 STEP 2 / OUTPUT count / END FOR
What does this loop print? FOR i FROM 0 TO 2 STEP 1 / OUTPUT i + 1 / END FOR
Trace this pseudocode: SET total TO 0 / FOR n FROM 1 TO 4 STEP 1 / SET total TO total + n / END FOR. What does total hold?
What does this loop print? SET n TO 3 / WHILE n > 0 / OUTPUT n / SET n TO n - 1 / END WHILE
How many values are printed by this loop? FOR p FROM 1 TO 5 STEP 2 / OUTPUT p / END FOR
How many times does this loop body run? SET i TO 0 / WHILE i < 4 / SET i TO i + 2 / END WHILE
How many times does OUTPUT run? FOR row FROM 1 TO 2 STEP 1 / FOR col FROM 1 TO 3 STEP 1 / OUTPUT row + col / END FOR / END FOR
A program defines FUNCTION total(price, tax) / RETURN price + tax / END FUNCTION and calls total(20, 3). Which statement is true?
A program defines FUNCTION double(n) / RETURN n * 2 / END FUNCTION. What value does double(7) return?
A program defines FUNCTION larger(a, b) / IF a > b THEN RETURN a ELSE RETURN b END IF / END FUNCTION. What does larger(4, 9) return?
A program defines FUNCTION increase(value) / SET value TO value + 1 / RETURN value / END FUNCTION. What does increase(4) return?
A program defines FUNCTION average(total, count) / RETURN total DIV count / END FUNCTION. What does average(17, 2) return?
A program defines FUNCTION square(n) / RETURN n * n / END FUNCTION, then runs SET result TO square(3). What does result hold?
A list named scores holds [8, 3, 9, 5] and indexes start at 0. The program runs SET scores[1] TO scores[3]. What does the list hold now?
A list named pets holds ['cat', 'dog', 'fish'] and indexes start at 0. What value is pets[2]?
A list named colors holds ['red', 'blue', 'green'] and indexes start at 0. The program runs SET colors[1] TO 'purple'. What does the list hold now?
A list named nums holds [6, 2, 8, 4] and indexes start at 0. The program runs SET nums[2] TO nums[0]. What does the list hold now?
A list named days holds ['Mon', 'Tue', 'Wed', 'Thu'] and indexes start at 0. Which index names 'Wed'?
A program should add every number in a list, but it always prints only the last number. SET total TO 0 was placed inside the loop instead of before it. How is this fault classified?
A program should give a discount when total is 50 or more, but its condition is total > 50. It runs but gives no discount at exactly 50. What kind of fault is this?
A program should find the largest list value, but each loop iteration sets max to the current item without comparing values. It runs and reports the last item. What kind of fault is this?
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.
Course Review: Cybersecurity and Digital Citizenship
50 questions