← ACARA Digital Technologies Years 5–6

Showing a counter in a flowchart

A flowchart counter: set count to 0 in a step box, add 1 inside the loop, then ask count = 5? in a diamond. Yes leaves the loop, No goes round again.

Understanding Showing a counter in a flowchart in ACARA Digital Technologies Years 5–6

What it does: The diamond tests the counter. Yes exits the loop, and No sends the arrow back up to repeat the steps. The start value is set once, before the loop, so the counter begins at 0 and is not reset each time round. Setting a value is an action, so it goes in a step box. Diamonds are only for questions with Yes or No answers. count ← count + 1 takes the old count and makes it one bigger. count ← 1 would just put 1 in the box every time. A question with a Yes or No answer goes in a diamond. It has two arrows leaving it, one for Yes and one for No.

Common mistakes: The counter must start at 0 before the loop. If it starts at 5, the test count = 5? is already true. The line should be: Step box: count ← 0. The counter goes up by 1 each time round the loop. Taking 1 away would take count further from 5. It should be count ← count + 1.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 120–132) 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.

Learning
Duo
Which shape holds the step 'set count to 0' in a flowchart?
A step box (rectangle)A decision diamond
Matches
Loop step box: count ← 0 (inside the loop, before the diamond count = 5?)
↓
count is set back to 0 every time round the loop, so it never reaches 5 and the loop never ends. Set it to 0 once before the loop.
Applying
Meanings
Term
count ← count + 1
Meaning
A flowchart counter: set count to 0 in a step box, add 1 inside the loop, then ask count = 5? in a diamond. Yes leaves the loop, No goes round again.
Practice
START
Testing
Gaps
Step box: count ←
Check Answer
Spots
1START
2Step box: count ← 5

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Lion's Mane Jellyfish' badge — Set Operator, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which shape holds the step 'set count to 0' in a flowchart?
A. A decision diamond
B. A step box (rectangle) ✓
Setting a value is an action, so it goes in a step box. Diamonds are only for questions with Yes or No answers.
2. Where should 'set count to 0' go in a flowchart with a counter?
A. Inside the loop
B. Before the loop starts ✓
If count was set to 0 inside the loop, it would go back to 0 every time round and never reach 5. Set it once, before the loop.
3. Which step adds one to the counter?
A. count ← count + 1 ✓
B. count ← 1
count ← count + 1 takes the old count and makes it one bigger. count ← 1 would just put 1 in the box every time.
4. What shape is used for the question 'count = 5?'
A. A decision diamond ✓
B. A step box
A question with a Yes or No answer goes in a diamond. It has two arrows leaving it, one for Yes and one for No.
5. The diamond 'count = 5?' says No. What happens next?
A. The arrow goes back and the loop runs again ✓
B. The flowchart ends
No means the counter has not reached 5 yet, so the arrow leads back round the loop to add 1 again.

Match the Pairs

count ← 0 → A step box before the loop that sets the counter to 0 so counting starts from zero
count ← count + 1 → A step box inside the loop that adds 1 to the counter each time round
The decision diamond asks if the counter has reached the target. Yes leaves the loop and No goes round again. → count = 5? Yes or No
The counter must start at zero in a step box before the loop begins → count ← 0
Loop step box: count ← 0 (inside the loop, before the diamond count = 5?) → count is set back to 0 every time round the loop, so it never reaches 5 and the loop never ends. Set it to 0 once before the loop.
Loop: Print Hello, then diamond count = 5? and no step box that adds 1 to count → The counter never goes up because there is no count ← count + 1 step inside the loop, so count = 5? is never Yes.

Key Term

count ← count + 1
A flowchart counter: set count to 0 in a step box, add 1 inside the loop, then ask count = 5? in a diamond. Yes leaves the loop, No goes round again.

Fill in the Blanks

1. Step box: count ← 0
Hint: Type the starting value the counter gets before the loop begins.
2. Loop step box: count ← count + 1
Hint: Type the operator that makes the counter go up.
3. Loop step box: count ← count + 1
Hint: Type the number added to the counter each time round the loop.
4. Diamond: count = 5?
Hint: Type the name of the variable that the diamond checks.
5. Diamond: count = 5? Yes -> leave the loop No -> go round again
Hint: Type the answer to the question that lets you leave the loop.

Spot the Error

Question 1
A START
B Step box: count ← 5
C Step box: count ← count + 1
D Diamond: count = 5?
E Yes: END. No: back to line 3
Line B — The counter must start at 0 before the loop. If it starts at 5, the test count = 5? is already true. The line should be: Step box: count ← 0.
Question 2
A START
B count ← 0
C count ← count - 1
D Diamond: count = 5?
E No: go back to line 3
F Yes: END
Line C — The counter goes up by 1 each time round the loop. Taking 1 away would take count further from 5. It should be count ← count + 1.
Question 3
A START
B count ← 0
C count ← count + 1
D Box: count = 5?
E Yes: END
Line D — A question with a Yes or No answer goes in a decision diamond, not a step box. It should be Diamond: count = 5?.
Question 4
A START
B Step box: count ← 0
C Diamond: count ← count + 1
D Diamond: count = 5?
Line C — Adding 1 is an action, so it belongs in a step box. A diamond is only for Yes/No questions. It should be Step box: count ← count + 1.
Question 5
A START
B Set count to 1
C Add 1 to count
D Is count = 5?
E No: go back to Add 1
Line B — The count should start at 0 so that it counts all 5 times round the loop. Starting at 1 would stop after only 4 loops. It should be Set count to 0.

Student with a class code? Join your class →