A variable that counts in a loop
Makes a counter. Set count to 0 before the loop, ADD 1 TO count inside the loop each time it repeats, then SHOW count after the loop.
Understanding A variable that counts in a loop in ACARA Digital Technologies Years 5–6
What it does: SHOW count goes after the loop, so it displays the final total once the repeating is done. ADD 1 TO count makes the number bigger each time. SET count TO 1 would just put the counter back to 1 again. The counter goes 1, 2, 3, 4, 5. After 5 repeats it holds 5. Set the counter to 0 first, add 1 inside the loop, then show it. Putting SET inside the loop resets the counter every time. SET count TO 0 is the starting step of a counter, placed before the loop begins.
Common mistakes: A counter must start at 0 before the loop. Starting at 1 makes the final count one too big. It should be SET count TO 0. The counter is called count, but this line shows a variable called total that was never made. It should be SHOW count.
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
SET count TO 0Fill in the Blanks
Spot the Error
Student with a class code? Join your class →