← ACARA Digital Technologies Years 7–8

Drawing a loop inside a decision in a flowchart

A loop drawn on the Yes arrow of a decision diamond. It only runs if Yes is taken. The No path skips it. When the loop ends, its exit arrow rejoins the main flow.

Understanding Drawing a loop inside a decision in a flowchart in ACARA Digital Technologies Years 7–8

What it does: After the loop ends, its exit arrow joins the same next step as the No path, so both paths continue together. The first box of the loop hangs off the Yes arrow of the diamond, so the loop only starts when the bin is full. The No arrow goes around the loop, so the loop is skipped completely. If No led into the loop, the loop would not be skipped. In this module the loop is inside the decision. The order is the opposite of a decision inside a loop. A loop can be drawn on either path of a decision. Here it is on the Yes path.

Common mistakes: A question with Yes and No answers must be drawn in a decision diamond, not a step box. It should be 'Start -> Diamond: Any dishes?'. The loop's check must come after the step on the Yes path ('Then -> Diamond: Any left?'). It cannot start straight from Start, because the loop is only reached through the Yes arrow.

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 365–411) and word search (Modules 331–411).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A loop is drawn on the Yes arrow of a decision diamond. When does the loop run?
Every time the flowchart runs, whatever the answerOnly when the answer to the decision is Yes
Matches
Decision: Is it raining? No -> Loop: Close a window until all are closed
↓
The loop is drawn on the No path, but it should be on the Yes path. Closing windows would happen when it is NOT raining.
Applying
Meanings
Term
Loop on the Yes path
Meaning
A loop drawn on the Yes arrow of a decision diamond. It only runs if Yes is taken. The No path skips it. When the loop ends, its exit arrow rejoins the main flow.
Practice
SET count ← 1
Testing
Gaps
3 TIMES
Check Answer
Spots
1Start -> Step: Any dishes?
2Yes -> Step: Wash a dish

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

The 'Desert Jerboa' badge — High Jumper, 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. A loop is drawn on the Yes arrow of a decision diamond. When does the loop run?
A. Every time the flowchart runs, whatever the answer
B. Only when the answer to the decision is Yes ✓
The loop sits on the Yes path, so it is only entered when Yes is taken.
2. What happens on the No path when the loop is drawn on the Yes path?
A. The loop is skipped and the flow carries on past it ✓
B. The loop runs once and then the flow carries on
The No arrow goes around the loop, so the loop is skipped completely.
3. Where should the exit arrow of the loop go when the loop finishes?
A. It rejoins the main flow after the decision ✓
B. It goes back up to Start
The exit arrow rejoins the main flow so both paths carry on to the same next step.
4. Which flowchart shows a loop that is skipped when the answer is No?
A. The No arrow leads into the first box of the loop
B. The No arrow leads past the loop to the next step ✓
If No led into the loop, the loop would not be skipped.
5. A student draws the loop first and puts the decision diamond inside it. Is this a loop on the Yes path of a decision?
A. No, that is a decision inside a loop ✓
B. Yes, it is the same thing
In this module the loop is inside the decision. The order is the opposite of a decision inside a loop.

Match the Pairs

Decision: Is it raining? Yes -> Loop: Is every window closed? No -> Close a window -> back to loop question → A loop sits on the Yes path. It only runs when it is raining, and it repeats until every window is closed.
Decision: Is it raining? No -> arrow goes straight to Show 'Done' → The No path skips the loop completely and carries on with the main flow.
The loop exit arrow rejoins the main flow so the Yes and No paths meet again at the same step. → Loop question: Is every window closed? Yes -> Show 'Done' (same step the No path goes to)
The loop is only entered when the decision gives Yes, so its first step is drawn on the Yes arrow. → Is the bin full? Yes -> Is the bin empty yet? No -> Take out one item -> back to question
Decision: Is it raining? No -> Loop: Close a window until all are closed → The loop is drawn on the No path, but it should be on the Yes path. Closing windows would happen when it is NOT raining.
Is it raining? Yes -> Loop: Close a window -> Is every window closed? Yes -> end of flowchart (No path never reaches Show 'Done') → The loop exit arrow does not rejoin the main flow, so the flowchart stops and the next step is never reached.

Key Term

Loop on the Yes path
A loop drawn on the Yes arrow of a decision diamond. It only runs if Yes is taken. The No path skips it. When the loop ends, its exit arrow rejoins the main flow.

Fill in the Blanks

1. IF score > 10 THEN REPEAT 3 TIMES OUTPUT "Well done"
Hint: Type the keyword that starts the loop on the Yes path of the decision.
2. IF lights = "off" THEN REPEAT UNTIL lights = "on" FLICK switch
Hint: Type the keyword that keeps the loop running until its condition becomes true.
3. END REPEAT END IF OUTPUT "Goodbye"
Hint: Type the keyword that closes the decision after the loop has ended. The main flow then rejoins.
4. IF answer = "Yes" THEN REPEAT UNTIL count = 5 count ← count + 1
Hint: Type the name of the counter variable that the loop checks and changes.
5. IF mark >= 50 THEN REPEAT 2 TIMES OUTPUT "Pass"
Hint: Type the operator that means 'greater than or equal to' for the decision diamond.

Spot the Error

Question 1
A Start -> Step: Any dishes?
B Yes -> Step: Wash a dish
C Then -> Diamond: More dishes?
D Yes -> back to Wash a dish
E More dishes? No -> Dry up
F Any dishes? No -> Dry up
Line A — A question with Yes and No answers must be drawn in a decision diamond, not a step box. It should be 'Start -> Diamond: Any dishes?'.
Question 2
A Start -> Diamond: Homework?
B Yes -> Step: Do a question
C Start -> Diamond: Any left?
D Yes -> back to Do a question
E Any left? No -> Pack bag
F Homework? No -> Pack bag
Line C — The loop's check must come after the step on the Yes path ('Then -> Diamond: Any left?'). It cannot start straight from Start, because the loop is only reached through the Yes arrow.
Question 3
A Start -> Diamond: Monday?
B No -> Step: Water a plant
C Then -> Diamond: More plants?
D Yes -> back to Water a plant
E More plants? No -> Go inside
F Monday? No -> Go inside
Line B — The loop belongs on the Yes path, so it only runs when it is Monday. Line 2 should start with 'Yes ->'. Putting it on No would run the loop on the wrong days.
Question 4
A Start -> Diamond: Bin full?
B Yes -> Step: Empty the bin
C Bin full? No -> Empty the bin
D Empty it -> Diamond: Another?
E Yes -> back to Empty the bin
F Another? No -> Wash hands
Line C — The No path must skip the loop and go straight to the step after it. Line 3 should be 'Bin full? No -> Wash hands'. Sending No into the loop means the loop runs even when the bin isn't full.
Question 5
A Start -> Diamond: Raining?
B Yes -> Step: Shut a window
C Then -> Diamond: More windows?
D Yes -> back to Raining?
E More windows? No -> Go to bed
F Raining? No -> Go to bed
Line D — The loop arrow must return to the loop's own step, 'Shut a window'. Going back to the 'Raining?' diamond asks the first decision again instead of repeating the loop.

Student with a class code? Join your class →