AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Reading flowcharts

Week 2 · Unit 1: Go with the flow · 3 lessons
3

Two decisions

Computing 6: Unit 1, pp. 8–21
GoalCount the outcomes of a flowchart with more than one decision and list every path through it.
New words
path · one route through a flowchart from the start to the stopnested decision · a decision that sits inside one branch of another decisionoutcome · the result at the end of one path
Explanation

Every decision splits the path in two. If two decisions come one after the other, each of the two paths from the first decision meets the second decision. This gives 2 × 2 = 4 outcomes. Three decisions in a row give 2 × 2 × 2 = 8 outcomes. A nested decision works differently. If the second decision sits in only one branch, the other branch goes straight on to the stop. Always list the paths, such as yes-yes, yes-no, no-yes and no-no, to be sure of your count. Flowcharts are also used outside computing to describe how a factory, a shop or a project works.

Startis it cold?yesnopack a coatpack a T-shirtis rain forecast?yesnopack an umbrellapack sun creamEnd
Worked examples
Is it cold?Is rain forecast?What is packed
yesyescoat and umbrella
yesnocoat and sun cream
noyesT-shirt and umbrella
nonoT-shirt and sun cream
Sara’s packing flowchart has two decisions one after the other, so it has 4 outcomes. Here are all four paths.
Startread the signis the pool open?yesnoswimis the park open?yesnoplay in the parkgo homeEnd
In Omar’s flowchart the second decision is nested inside the ‘no’ branch of the first. If the pool is open, he just swims. So there are only 3 outcomes, not 4: swim, play in the park or go home.
To count outcomes, count the stops at the ends of the paths. Do not just multiply by 2 every time you see a diamond. Look at where each diamond sits.
Class activity

Outcome detective (no computer): plan a weekend with two decisions. Decision 1: ‘Is the weather dry?’ Decision 2: ‘Is a friend free?’. Draw the flowchart on paper, with a different activity at the end of each of the four paths. Write one sentence for each outcome. Then an adult answers the questions in a surprising order, and you say what the plan is each time. If you have a computer or tablet, you can draw the flowchart in a drawing program.

Practice
1
List every outcome of this flowchart.
Startis the battery low?yesnoask an adult to charge itleave it as it isis the screen dirty?yesnowipe the screenskip cleaningEnd
2
How many outcomes does this flowchart have? Name them.
Starttype the quiz scorescore below 50?yesnoshow: keep goingscore 80 or more?yesnoshow: gold starshow: silver starEnd
3
A flowchart has three decisions one after another. How many outcomes can it have?
4
Ben says, ‘A flowchart with two decisions always has four outcomes.’ Is he right? Explain.