Turning a flowchart into written steps

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

Turning a flowchart into written steps

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A flowchart has a diamond with the question 'Is it raining?' and two arrows, Yes and No. How do you write the diamond as steps?
A REPEAT it is raining
B IF it is raining THEN ... ELSE ...
2. In a flowchart, an arrow goes back up to an earlier step. What does it become in written steps?
A REPEAT
B START
3. A diamond asks 'Is the bag full?'. The No arrow goes back to 'Add a book'. Which written steps match?
A REPEAT Add a book UNTIL the bag is full
B IF the bag is full THEN add a book
4. Which is the first thing to do when you turn a flowchart into written steps?
A Start at the last box and work backwards
B Follow the arrows from START and number each step in order
5. A flowchart has a diamond with Yes and No arrows. Neither arrow goes back up to an earlier step. Should you write it as a loop?
A No, write it as IF ... THEN ... ELSE
B Yes, write it as REPEAT

Match the Pairs

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

Left columnRight column
1Diamond: Is it raining? Yes → take umbrella, No → wear hat AThe back arrow was ignored, so the steps only happen once. REPEAT is needed around the steps that go round again.
2Arrow from the last box back up to an earlier box BBecomes a REPEAT in the written steps, so the steps in between happen again
3A diamond that asks a question each time round the loop becomes the loop condition CFlowchart: Yes path = take umbrella. Steps: IF raining THEN take umbrella
4After translating, check both versions do the same thing by following each one with the same starting facts DThe diamond was written as two plain steps, so the decision is lost. It should be IF ... THEN ... ELSE.
5Flowchart has a diamond with Yes and No paths. Steps: 1. Take umbrella 2. Wear hat EBecomes written steps: IF it is raining THEN take umbrella ELSE wear hat
6Flowchart has a back arrow to 'Stir soup'. Steps: 1. Stir soup 2. Taste soup (no REPEAT) FREPEAT UNTIL the bin is empty

Definitions

flowchart to steps

Fill in the Blanks

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

1.
__ the bag is heavy THEN use a trolley
2.
IF the door is locked ____ use the key
3.
IF it is sunny THEN wear a hat ____ take an umbrella
4.
______ stir the soup UNTIL the soup is hot
5.
REPEAT add a cup of water _____ the bucket is full

Spot the Error

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

Question 1
A Pick up the ball
B IF the ball is flat THEN
C Pump up the ball
D THEN
E Bounce the ball
Question 2
A START
B REPEAT UNTIL the cup is full
C Drink the water
D END REPEAT
E STOP
Question 3
A START
B REPEAT 3 TIMES
C Jump up and down
D END IF
E STOP
Question 4
A START
B IF the light is green THEN
C Stop the car
D ELSE
E Keep driving
Question 5
A START
B IF the door is locked
C Use the key
D END IF

Answer Key

Turning a flowchart into written steps
Section A: Quick Questions
Q1
B — IF it is raining THEN ... ELSE ...
Q2
A — REPEAT
Q3
A — REPEAT Add a book UNTIL the bag is full
Q4
B — Follow the arrows from START and number each step in order
Q5
A — No, write it as IF ... THEN ... ELSE
Section B: Match the Pairs
Q1
Diamond: Is it raining? Yes → take umbrella, No → wear hat → Becomes written steps: IF it is raining THEN take umbrella ELSE wear hat
Q2
Arrow from the last box back up to an earlier box → Becomes a REPEAT in the written steps, so the steps in between happen again
Q3
A diamond that asks a question each time round the loop becomes the loop condition → REPEAT UNTIL the bin is empty
Q4
After translating, check both versions do the same thing by following each one with the same starting facts → Flowchart: Yes path = take umbrella. Steps: IF raining THEN take umbrella
Q5
Flowchart has a diamond with Yes and No paths. Steps: 1. Take umbrella 2. Wear hat → The diamond was written as two plain steps, so the decision is lost. It should be IF ... THEN ... ELSE.
Q6
Flowchart has a back arrow to 'Stir soup'. Steps: 1. Stir soup 2. Taste soup (no REPEAT) → The back arrow was ignored, so the steps only happen once. REPEAT is needed around the steps that go round again.
Section C: Definitions
Q1
flowchart to steps — Changing a flowchart into written steps: a diamond becomes IF or a loop condition, a back arrow becomes REPEAT, then check both versions do the same thing.
Section D: Fill in the Blanks
Q1
IF the bag is heavy THEN use a trolley
Q2
IF the door is locked THEN use the key
Q3
IF it is sunny THEN wear a hat ELSE take an umbrella
Q4
REPEAT stir the soup UNTIL the soup is hot
Q5
REPEAT add a cup of water UNTIL the bucket is full
Section E: Spot the Error
Q1
D — The No arrow leaving a diamond becomes ELSE, not THEN. THEN only comes at the end of the IF line. Line 4 should be ELSE.
Q2
C — The flowchart box inside the loop says to pour in water. The written step must match the box, so line 3 should be 'Pour in some water'.
Q3
D — The back arrow became a REPEAT, so it must be closed with END REPEAT. END IF belongs to IF steps. Line 4 should be END REPEAT.
Q4
B — The diamond in the flowchart asks 'Is the light red?'. The IF condition must use the same question. Line 2 should be IF the light is red THEN.
Q5
B — An IF line needs the word THEN after the condition. Line 2 should be IF the door is locked THEN.