Algorithms & Scratch Quiz
Get yourself into exam mode with this algorithms and Scratch quiz of 90 corrected questions covering the entire chapter as laid out in the standard middle school curriculum: vocabulary (instruction, sequence, algorithm), variables (declaration, assignment, incrementing), If/Else conditional statements, bounded loops ("Repeat N times") and unbounded loops ("While"), step-by-step execution traces, reading and writing typical Scratch scripts (move, turn, pen, add to a variable, display), building geometric shapes (square, regular polygon), and spotting errors (infinite loops, misplaced conditions). Three progressive levels, with step-by-step explanations backed by official curriculum guidelines.
Algorithms & Scratch Quiz: Mastering Variables, Loops, and Conditions for Your Exam
Vocabulary and Variables: The Basics You Need to Know
An algorithm is a finite sequence of precise instructions, carried out in a set order. A variable is a named "box" that stores a value: you initialize it ("set x to 0"), assign it ("set x to 5"), or increment it ("add 1 to x"). The most common pitfall is forgetting to initialize a variable at the start of the script, which can crash the program or produce inconsistent results. The easy quiz zeroes in on exactly these habits.
Conditional Statements: The If/Else Block
The "If … then … else …" block runs one branch or the other depending on whether the logical test is true or false. On the exam, you're often asked to predict what a script with a simple condition (equality, comparison) will display, or to identify the right test to solve a problem (like displaying the larger of two numbers, for example). The hard-level questions also work through nested structures: a condition inside a loop.
Loops: Repeat N Times vs. While
This is THE distinction to nail down. "Repeat N times" is a bounded loop: the number of passes is fixed in advance. "While … do" is an unbounded loop: it keeps going as long as a condition is true, so it may stop at an unpredictable point, or never stop at all if the condition never changes — the dreaded infinite loop. Several questions in the quiz focus on tracing through a While loop step by step, a classic question type on exams.
Programming a Geometric Shape with Scratch
Exam questions often use Scratch to have a sprite draw a shape. The key formula to remember: to draw a regular polygon with n sides, you write Repeat n times { move forward by … ; turn by 360°/n }. A square needs 4 iterations and a 90° angle, an equilateral triangle needs 3 iterations and 120°, a hexagon needs 6 and 60°, an octagon needs 8 and 45°, a dodecagon needs 12 and 30°. Watch out: you turn by the EXTERIOR angle of the polygon (the supplement of the interior angle), not the interior angle itself — that's the most common mistake. A pentagram (5-pointed star) requires 144°.
Detecting and Fixing Algorithm Errors
The standard curriculum explicitly requires being able to identify errors in a script: an uninitialized variable, an infinite loop (the tested variable never changes), a faulty condition (a < b instead of a > b in a max-finding algorithm), or an instruction placed outside the loop. Three hard-level questions in the quiz give you practice with this kind of code review, which is a classic feature of official sample exams and recent tests.
Digging Deeper with Other Exam Topics
Play in Timed Mode to Practice Under Exam Conditions
To simulate the pressure of test day, fire up the timed quiz: a limited amount of time per question to help you build speed and accuracy. Every day, the daily quiz serves up a fresh batch across all levels to keep your skills sharp without spending an hour on it every day.
9 quizzes, 90 questions, 3 levels
Explore more in science
Top Players — Algorithms & Scratch
Test yourself in other categories
Frequently Asked Questions
Algorithms & Scratch Quiz — Easy #1
🏆 Save your score
Appear on this quiz's leaderboard.