Turning numbered steps into a flowchart

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

Turning numbered steps into a flowchart

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Your algorithm has the step: 3. IF it is raining THEN take an umbrella. Which flowchart shape do you draw for the IF?
A A plain rectangle
B A diamond
2. Your algorithm has the step: 2. Add 1 to score. Which shape do you draw?
A A diamond
B A rectangle (a step box)
3. Your algorithm says: 4. REPEAT from step 2. How do you show this in a flowchart?
A Draw an arrow going back to the shape for step 2
B Draw a new box that says REPEAT and stop
4. How many flowchart shapes does each numbered step usually become?
A One shape for each step
B One shape for the whole algorithm
5. A flowchart has a diamond that asks: Is score = 10? How many arrows should leave the diamond?
A Two arrows, labelled Yes and No
B One arrow only

Match the Pairs

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

Left columnRight column
13. IF score > 10 THEN say "Win" ADraw a diamond shape asking "Is score > 10?" with a Yes arrow to a "Win" step
24. REPEAT from step 2 B2. ADD 1 to count → [ ADD 1 to count ]
3Each ordinary numbered step becomes one rectangle shape, joined to the next shape by an arrow CIF it is raining THEN → <Is it raining?> Yes / No
4A decision in the steps becomes a diamond with two arrows out, labelled Yes and No DA REPEAT should be an arrow going back to the shape for step 2, not forward to End.
5Step 3: IF age >= 10 → drawn as a rectangle EDraw an arrow from this step back up to the shape for step 2
6Step 5: REPEAT from step 2 → drawn as a new shape that goes forward to End FAn IF must be drawn as a diamond, not a rectangle. A rectangle can't show a Yes and No choice.

Definitions

step = shape

Fill in the Blanks

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

1.
IF age >= 10 THEN = _______ shape
2.
REPEAT = arrow ____ to an earlier shape
3.
1. SET total TO 0 Shape for step 1: _________
4.
2. IF count > 5 THEN Diamond question: _____ > 5 ?
5.
Both versions must give the ____ result

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A Oval: START
B Box: set count to 0
C Box: count < 3?
D Box: add 1 to count
E Arrow: back to the diamond
Question 2
A Diamond: START
B Box: ask for the age
C Diamond: age >= 10?
D Box: say Big kid
Question 3
A Oval: START
B Diamond: add 1 to count
C Diamond: count = 3?
D No: arrow back to the box
Question 4
A Box: lose 1 life
B Diamond: lives = 0?
C No: arrow on to the END oval
D Yes: go to END
Question 5
A 1 START -> oval
B 2 SET n TO 0 -> box
C 3 IF n < 5 -> diamond
D 4 REPEAT -> arrow forward

Answer Key

Turning numbered steps into a flowchart
Section A: Quick Questions
Q1
B — A diamond
Q2
B — A rectangle (a step box)
Q3
A — Draw an arrow going back to the shape for step 2
Q4
A — One shape for each step
Q5
A — Two arrows, labelled Yes and No
Section B: Match the Pairs
Q1
3. IF score > 10 THEN say "Win" → Draw a diamond shape asking "Is score > 10?" with a Yes arrow to a "Win" step
Q2
4. REPEAT from step 2 → Draw an arrow from this step back up to the shape for step 2
Q3
Each ordinary numbered step becomes one rectangle shape, joined to the next shape by an arrow → 2. ADD 1 to count → [ ADD 1 to count ]
Q4
A decision in the steps becomes a diamond with two arrows out, labelled Yes and No → IF it is raining THEN → <Is it raining?> Yes / No
Q5
Step 3: IF age >= 10 → drawn as a rectangle → An IF must be drawn as a diamond, not a rectangle. A rectangle can't show a Yes and No choice.
Q6
Step 5: REPEAT from step 2 → drawn as a new shape that goes forward to End → A REPEAT should be an arrow going back to the shape for step 2, not forward to End.
Section C: Definitions
Q1
step = shape — Each numbered step becomes one flowchart shape. An IF becomes a diamond, and a REPEAT becomes an arrow going back to an earlier shape. Both versions should do the same thing.
Section D: Fill in the Blanks
Q1
IF age >= 10 THEN = diamond shape
Q2
REPEAT = arrow back to an earlier shape
Q3
1. SET total TO 0 Shape for step 1: rectangle
Q4
2. IF count > 5 THEN Diamond question: count > 5 ?
Q5
Both versions must give the same result
Section E: Spot the Error
Q1
C — A question that makes a choice or decides when to stop a loop must be a diamond, not a box. The line should be 'Diamond: count < 3?'.
Q2
A — START is drawn as an oval (rounded shape). A diamond is only for decisions. The line should be 'Oval: START'.
Q3
B — Adding 1 is an ordinary step, so it gets a box. Only questions get a diamond. The line should be 'Box: add 1 to count'.
Q4
C — A REPEAT is shown by an arrow that goes back to an earlier shape. The No arrow must go back to 'lose 1 life', not forward to END.
Q5
D — A REPEAT becomes an arrow going back to an earlier shape so the steps can run again. It should be 'arrow back'.