Drawing a nested decision in a flowchart

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Drawing a nested decision in a flowchart

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

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
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?
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
4. Each diamond in a nested decision needs how many exits?
A Two labelled exits, Yes and No
B Just one exit
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

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

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

Definitions

nested decision

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
Diamond 1: Is mark >= 50? Yes -> _______ 2: Is mark >= 85? No -> Print "Try again" -> End
2.
Diamond 1: Is it a weekday? ___ -> Diamond 2: Is it before 8am? No -> Print "Sleep in" -> End
3.
Diamond 1: Is score > 10? Yes -> Diamond 2: Is score > 20? No -> Print "Low" -> ___
4.
Diamond 1: Is it a school day? Yes -> Diamond _: Is it raining? No -> Print "Free day" -> End
5.
Diamond 1 Yes -> Diamond 2: Is x > 100? Diamond 2 Yes -> Print "Big" -> End Diamond 2 __ -> Print "Small" -> End

Spot the Error

Shade in the letter of the line that contains an 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
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
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
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
Question 5
A Start
B Input
C Decision: score >= 50?
D Yes -> Decision: score >= 90?
E Yes -> Output Top mark
F All paths -> End

Answer Key

Drawing a nested decision in a flowchart
Section A: Quick Questions
Q1
B — On the Yes or No path of the first diamond
Q2
B — Do I have an umbrella?
Q3
A — Only after the first question has been answered the right way for that branch
Q4
A — Two labelled exits, Yes and No
Q5
A — Every path reaches the End shape
Section B: Match the Pairs
Q1
Diamond A: Yes arrow -> Diamond B → A nested decision: the second question (B) is only asked when the answer to A is Yes.
Q2
Diamond A: No arrow -> End → This path skips the inner diamond and goes straight to the End shape, so every path still finishes.
Q3
The inner question is only asked after the first answer is Yes → Is it raining? Yes -> Do I have an umbrella?
Q4
Every path in a nested decision flowchart finishes at End → Inner Yes -> Take umbrella -> End; Inner No -> Stay home -> End
Q5
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.
Q6
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.
Section C: Definitions
Q1
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.
Section D: Fill in the Blanks
Q1
Diamond 1: Is mark >= 50? Yes -> Diamond 2: Is mark >= 85? No -> Print "Try again" -> End
Q2
Diamond 1: Is it a weekday? Yes -> Diamond 2: Is it before 8am? No -> Print "Sleep in" -> End
Q3
Diamond 1: Is score > 10? Yes -> Diamond 2: Is score > 20? No -> Print "Low" -> End
Q4
Diamond 1: Is it a school day? Yes -> Diamond 2: Is it raining? No -> Print "Free day" -> End
Q5
Diamond 1 Yes -> Diamond 2: Is x > 100? Diamond 2 Yes -> Print "Big" -> End Diamond 2 No -> Print "Small" -> End
Section E: Spot the Error
Q1
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?
Q2
C — A diamond must hold a yes/no question, not an action. It should be: Decision: mark >= 50?
Q3
B — The value must be entered before the decision uses it. Line 2 should be Input temp, not Output temp.
Q4
A — A flowchart must begin with the Start shape. Line 1 should be Start. End belongs at the finish of every path.
Q5
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