← Years 7–8 Creating Digital Solutions

Drawing a nested decision in a flowchart

A diamond placed on the Yes or No path of another diamond, so the second question is only asked after the first answer. Every path still ends at the End shape.

Understanding Drawing a nested decision in a flowchart in Years 7–8 Creating Digital Solutions

What it does: The second diamond sits on the Yes arrow of the first, so it is only reached if it is raining. Both branches of the inner diamond lead to the End shape, so no path is left dangling. Nested means one diamond is inside a branch of another. A diamond whose Yes path leads to another diamond is nested. All paths reach End. The outer No path needs an arrow to an output or straight to the End shape. Questions are always drawn as diamonds. Rectangles are for processes, so they can't ask the inner question.

Common mistakes: The second question must be a diamond (Decision) on the Yes path. A process rectangle cannot ask a question. It should be: Yes -> Decision: has pass? A diamond must hold a yes/no question, not an action. It should be: Decision: mark >= 50?

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 3–47) and word search (Modules 3–125).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Where do you draw the second diamond in a nested decision?
Before the Start shapeOn the Yes or No path of the first diamond
Matches
Is it raining? Yes -> Print 'Wear a coat' (inner diamond floats next to it, with no arrow in)
↓
The inner diamond is not joined to the Yes arrow of the first diamond, so it can never be reached.
Applying
Meanings
Term
nested decision
Meaning
A diamond placed on the Yes or No path of another diamond, so the second question is only asked after the first answer. Every path still ends at the End shape.
Practice
Start
Testing
Gaps
Yes -> 2: Is mark >= 85?
Check Answer
Spots
3Decision: age >= 13?
4Yes -> Process: has pass?

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

The 'Ermine' badge — Tundra Streak, 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. Where do you draw the second diamond in a nested decision?
A. Before the Start shape
B. On the Yes or No path of the first diamond ✓
A nested decision puts the inner diamond on one branch of the outer diamond, so the second question is only asked after the first answer.
2. A flowchart asks 'Is it raining?' If Yes, it then asks 'Do I have an umbrella?' Which diamond is the inner one?
A. Is it raining?
B. Do I have an umbrella? ✓
The inner diamond sits on the Yes path of the outer diamond. 'Is it raining?' is asked first, so it is the outer diamond.
3. When is the inner diamond's question asked?
A. Only after the first question has been answered the right way for that branch ✓
B. Every time, at the same moment as the first question
The inner question sits on one branch, so it is only reached if the flow goes down that branch.
4. Each diamond in a nested decision needs how many exits?
A. Two labelled exits, Yes and No ✓
B. Just one exit
Every diamond is a question, so both the inner and the outer diamond need a Yes path and a No path.
5. In a nested decision flowchart, where do all the paths finally go?
A. Every path reaches the End shape ✓
B. Only the Yes paths reach the End shape
Even the paths that skip the inner diamond must still finish at End. No path can be left hanging.

Match the Pairs

Diamond A: Yes arrow -> Diamond B → A nested decision: the second question (B) is only asked when the answer to A is Yes.
Diamond A: No arrow -> End → This path skips the inner diamond and goes straight to the End shape, so every path still finishes.
The inner question is only asked after the first answer is Yes → Is it raining? Yes -> Do I have an umbrella?
Every path in a nested decision flowchart finishes at End → Inner Yes -> Take umbrella -> End; Inner No -> Stay home -> End
Is it raining? Yes -> Print 'Wear a coat' (inner diamond floats next to it, with no arrow in) → The inner diamond is not joined to the Yes arrow of the first diamond, so it can never be reached.
Inner diamond: Yes -> Take umbrella -> End; No -> (arrow goes nowhere) → The No path of the inner diamond does not reach End, so the flowchart never finishes on that path.

Key Term

nested decision
A diamond placed on the Yes or No path of another diamond, so the second question is only asked after the first answer. Every path still ends at the End shape.

Fill in the Blanks

1. Diamond 1: Is mark >= 50? Yes -> Diamond 2: Is mark >= 85? No -> Print "Try again" -> End
Hint: Type the name of the shape used for the second question on the Yes path.
2. Diamond 1: Is it a weekday? Yes -> Diamond 2: Is it before 8am? No -> Print "Sleep in" -> End
Hint: Type the branch label whose path leads to the inner diamond.
3. Diamond 1: Is score > 10? Yes -> Diamond 2: Is score > 20? No -> Print "Low" -> End
Hint: Type the shape that every path must finish at.
4. Diamond 1: Is it a school day? Yes -> Diamond 2: Is it raining? No -> Print "Free day" -> End
Hint: Type the number that names the inner diamond, the one asked second.
5. Diamond 1 Yes -> Diamond 2: Is x > 100? Diamond 2 Yes -> Print "Big" -> End Diamond 2 No -> Print "Small" -> End
Hint: Type the other branch label that leaves the inner diamond.

Spot the Error

Question 1
A Start
B Input age
C Decision: age >= 13?
D Yes -> Process: has pass?
E No -> Output Too young
F All paths -> End
Line D — The second question must be a diamond (Decision) on the Yes path. A process rectangle cannot ask a question. It should be: Yes -> Decision: has pass?
Question 2
A Start
B Input mark
C Decision: Add 50 to mark
D Yes -> Decision: mark >= 80?
E No -> Output Try again
F All paths -> End
Line C — A diamond must hold a yes/no question, not an action. It should be: Decision: mark >= 50?
Question 3
A Start
B Output temp
C Decision: temp > 25?
D Yes -> Decision: sunny?
E No -> Output Wear a jumper
F All paths -> End
Line B — The value must be entered before the decision uses it. Line 2 should be Input temp, not Output temp.
Question 4
A End
B Input coins
C Decision: coins >= 2?
D Yes -> Decision: want drink?
E No -> Output Need more
F All paths -> End
Line A — A flowchart must begin with the Start shape. Line 1 should be Start. End belongs at the finish of every path.
Question 5
A Start
B Input
C Decision: score >= 50?
D Yes -> Decision: score >= 90?
E Yes -> Output Top mark
F All paths -> End
Line B — The input step must say what is being entered. Without a variable the decisions have no value to test. It should be: Input score

Student with a class code? Join your class →