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
1

From steps to flowchart

Computing 6: Unit 1, pp. 8–21
GoalTurn a numbered algorithm into a flowchart, using loops and decisions where the steps ask for them.
New words
algorithm · a list of steps, in the right order, that solves a problemrepeat · to do a step or a group of steps againtrace · to follow a flowchart step by step, writing down what happens
Explanation

An algorithm can be written as a list of numbered steps. To turn the list into a flowchart, go through it one step at a time. Choose a shape for each step and draw it under the one before, with an arrow between them. When a step says ‘repeat’ or ‘go back to step 3’, draw an arrow that goes back up. When a step is a question, draw a diamond with a yes branch and a no branch. At the end check every shape. Each one needs an arrow going in and an arrow going out, except the start and the stop.

Starttake the bottle to the tapturn the tap onbottle not full?yeswait one secondnoturn the tap offEnd
Worked examples
StepInstructionShape
1Startoval
2Take the bottle to the tapparallelogram
3Turn the tap onrectangle
4Is the bottle not full?diamond
5If yes, wait one second and go back to step 4arrow back to the diamond
6If no, turn the tap offrectangle
7Stopoval
This is the algorithm that the flowchart above comes from. Look at how each numbered step became a shape. Step 5 sends the arrow back to step 4, so the question is asked again.
Startscan the book’s codeis the book damaged?yesnoto the repair boxto the lending deskEnd
Kenji draws the algorithm for a library desk. The question ‘Is the book damaged?’ is a diamond with two branches. Both branches join again before the stop.
Here are mistakes to look for when you check a flowchart: a shape with no arrow leaving it, a diamond with only one branch, a loop arrow that points to the wrong step, and a step that sits in the wrong shape.
Class activity

Tidy-up flowchart (no computer): write the steps for ‘put the toys away until the floor is clear’ as a numbered list. Include the question ‘Are there toys on the floor?’. Draw it as a flowchart with arrows, and check that your loop arrow goes back to the question. Now follow your own flowchart in real life with a pencil as a marker: point to each shape as you do the job. If you have a computer or tablet, draw the same flowchart in a drawing program.

Practice
1
Turn this algorithm into a flowchart. 1 Start. 2 Go to the door. 3 Press the bell. 4 Has nobody opened the door? 5 If yes, wait ten seconds, press the bell and go back to step 4. 6 If no, say hello. 7 Stop.
2
What question must go in the diamond so that the pencil is sharpened until it is sharp?
Startpick up a pencil?yessharpen the pencilnowrite your nameEnd
3
Write this flowchart as a numbered algorithm. What is shown when the price is 60? What is shown when the price is 20?
Starttype the priceprice above 50?yesnosubtract 5subtract 1show the new priceEnd
4
Mia draws a diamond with only one arrow, marked ‘yes’. What is missing, and why does it matter?