by BlastRoom
Practice tracing branching pseudocode and selecting inputs or conditions for each branch.
#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.
What does this pseudocode display? SET score TO 74 IF score >= 90 THEN DISPLAY "A" ELSE IF score >= 80 THEN DISPLAY "B" ELSE IF score >= 70 THEN DISPLAY "C" ELSE DISPLAY "F"
Trace this program. SET temp TO 30 IF temp > 30 THEN DISPLAY "hot" ELSE IF temp >= 20 THEN DISPLAY "warm" ELSE DISPLAY "cool"
What is displayed? SET tickets TO 0 IF tickets > 10 THEN DISPLAY "group" ELSE IF tickets > 0 THEN DISPLAY "single" ELSE DISPLAY "none"
What does this program display? SET level TO 5 IF level >= 8 THEN DISPLAY "expert" ELSE IF level >= 5 THEN DISPLAY "intermediate" ELSE DISPLAY "beginner"
What does the pseudocode display? SET hour TO 12 IF hour < 6 THEN DISPLAY "night" ELSE IF hour < 12 THEN DISPLAY "morning" ELSE DISPLAY "afternoon"
Run this pseudocode. SET balance TO 50 IF balance < 0 THEN DISPLAY "overdrawn" ELSE IF balance < 50 THEN DISPLAY "low" ELSE DISPLAY "okay"
What is displayed? SET day TO 6 IF day = 1 THEN DISPLAY "Monday" ELSE IF day = 6 THEN DISPLAY "Saturday" ELSE DISPLAY "other"
What does this code display? SET speed TO 55 IF speed > 65 THEN DISPLAY "fast" ELSE IF speed >= 55 THEN DISPLAY "limit" ELSE DISPLAY "slow"
Trace the branches. SET code TO 404 IF code >= 500 THEN DISPLAY "server" ELSE IF code >= 400 THEN DISPLAY "client" ELSE DISPLAY "success"
What does this pseudocode display? SET rain TO 2 IF rain = 0 THEN DISPLAY "dry" ELSE IF rain < 5 THEN DISPLAY "light" ELSE DISPLAY "heavy"
What is the output? SET age TO 13 IF age < 13 THEN DISPLAY "child" ELSE IF age < 18 THEN DISPLAY "teen" ELSE DISPLAY "adult"
What does the program display? SET points TO 100 IF points > 100 THEN DISPLAY "bonus" ELSE IF points >= 80 THEN DISPLAY "pass" ELSE DISPLAY "retry"
Which value of n makes this pseudocode display "big odd"? IF n MOD 2 = 0 THEN DISPLAY "even" ELSE IF n > 20 THEN DISPLAY "big odd" ELSE DISPLAY "small odd"
Which input reaches the "free" branch? IF age < 5 THEN DISPLAY "free" ELSE IF age < 13 THEN DISPLAY "child price" ELSE DISPLAY "standard price"
Which value of score displays "B"? IF score >= 90 THEN DISPLAY "A" ELSE IF score >= 80 THEN DISPLAY "B" ELSE DISPLAY "C"
Which value of minutes reaches the "short" branch? IF minutes > 60 THEN DISPLAY "long" ELSE IF minutes > 30 THEN DISPLAY "medium" ELSE DISPLAY "short"
Which value of x displays "negative"? IF x = 0 THEN DISPLAY "zero" ELSE IF x < 0 THEN DISPLAY "negative" ELSE DISPLAY "positive"
Which password length reaches "strong"? IF length < 8 THEN DISPLAY "too short" ELSE IF length < 12 THEN DISPLAY "okay" ELSE DISPLAY "strong"
Which number makes the program display "multiple of 3"? IF number MOD 2 = 0 THEN DISPLAY "even" ELSE IF number MOD 3 = 0 THEN DISPLAY "multiple of 3" ELSE DISPLAY "other"
Which value of temperature displays "freeze"? IF temperature > 30 THEN DISPLAY "hot" ELSE IF temperature > 0 THEN DISPLAY "liquid" ELSE DISPLAY "freeze"
Which value of count reaches the "many" branch? IF count = 0 THEN DISPLAY "none" ELSE IF count <= 3 THEN DISPLAY "few" ELSE DISPLAY "many"
This program should display "hot" for temp = 95, but it displays "warm." Why? SET temp TO 95 IF temp > 30 THEN DISPLAY "warm" ELSE IF temp > 90 THEN DISPLAY "hot" ELSE DISPLAY "cold"
Why can this program never display "child"? IF age >= 13 THEN DISPLAY "adult or teen" ELSE IF age < 18 THEN DISPLAY "teen" ELSE DISPLAY "child"
A program displays "pass" for score = 95 instead of "honors." What caused this? IF score >= 60 THEN DISPLAY "pass" ELSE IF score >= 90 THEN DISPLAY "honors" ELSE DISPLAY "retry"
Why does the "large" branch not run when size = 12? IF size > 10 THEN DISPLAY "medium or large" ELSE IF size > 11 THEN DISPLAY "large" ELSE DISPLAY "small"
For n = 8, why does this program display "positive" instead of "even positive"? IF n > 0 THEN DISPLAY "positive" ELSE IF n MOD 2 = 0 THEN DISPLAY "even positive" ELSE DISPLAY "other"
Why can the "high" branch never be reached? IF speed >= 50 THEN DISPLAY "moving" ELSE IF speed >= 80 THEN DISPLAY "high" ELSE DISPLAY "slow"
A library card is valid only when visits is at least 1 and no more than 10. Which condition fills the blank? IF ______ THEN DISPLAY "valid"
A number is outside the allowed range when it is less than 0 or greater than 100. Which condition expresses that rule? IF ______ THEN DISPLAY "outside range"
A user may enter when age is 16 or older and hasID is true. Which condition belongs in the blank? IF ______ THEN DISPLAY "enter"
A program should display "weekend" only for day = 6 or day = 7. Which condition is correct? IF ______ THEN DISPLAY "weekend"
A value should be labeled "odd" when its remainder after division by 2 is not 0. Which condition works? IF ______ THEN DISPLAY "odd"
A store gives free shipping when subtotal is at least 35 dollars, unless member is false. Which condition expresses the rule? IF ______ THEN DISPLAY "free shipping"
A password should be rejected when it is blank or its length is less than 8. Which condition is correct? IF ______ THEN DISPLAY "reject"
A robot moves forward only if battery is above 20 and obstacleAhead is false. Which condition belongs in the blank? IF ______ THEN DISPLAY "move"
What does this nested conditional display? SET age TO 14 SET ticket TO "student" IF age >= 13 THEN IF ticket = "student" THEN DISPLAY "Hall B" ELSE DISPLAY "Hall A" ELSE DISPLAY "Hall C"
What is displayed? SET loggedIn TO true SET role TO "guest" IF loggedIn = true THEN IF role = "admin" THEN DISPLAY "settings" ELSE DISPLAY "home" ELSE DISPLAY "sign in"
Trace this nested conditional. SET temperature TO -2 SET raining TO false IF temperature <= 0 THEN IF raining = true THEN DISPLAY "icy rain" ELSE DISPLAY "ice" ELSE DISPLAY "no ice"
What does this program display? SET score TO 82 SET submitted TO true IF score >= 70 THEN IF submitted = true THEN DISPLAY "pass" ELSE DISPLAY "missing work" ELSE DISPLAY "retry"
What is displayed? SET n TO 9 IF n > 0 THEN IF n MOD 2 = 0 THEN DISPLAY "positive even" ELSE DISPLAY "positive odd" ELSE DISPLAY "not positive"
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.
Loops and Iteration
40 questions