Using a count to stop a loop
A loop that keeps repeating its steps until the counter reaches the chosen number, 5. The counter must change inside the loop, or the loop never stops.
Understanding Using a count to stop a loop in ACARA Digital Technologies Years 5–6
What it does: The condition points = 5 is the stopping number. The loop keeps going until the points counter reaches 5. The line count ← count + 1 sits inside the loop, so the counter grows each time and the loop can stop at 5. The count goes 0 → 1 → 2 → 3. The steps run for the counts 0, 1 and 2. When count becomes 3, the loop stops. That is 3 times. To stop after 3 wrong answers, only wrong answers should be counted. Put wrong ← wrong + 1 inside an IF the answer is wrong.
Common mistakes: The count starts at 0, so the loop would stop straight away and never jump. The line should say REPEAT UNTIL count = 5. This adds 1 to wrong when the answer is correct. It should be IF answer ≠ 8 THEN so that only wrong answers are counted.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 106–119) and word search (Modules 106–132).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
REPEAT UNTIL count = 5Fill in the Blanks
Spot the Error
Student with a class code? Join your class →