Errors in a flowchart

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

Errors in a flowchart

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A student draws a rectangle for the step 'INPUT Age'. Is this correct?
A No, input needs a parallelogram
B Yes, every step uses a rectangle
2. A flowchart has a diamond with the question 'Age >= 18?'. One arrow leaves it, going down to 'OUTPUT Adult'. What is the error?
A No error: a decision only needs one arrow out
B Decision with one exit: it needs two labelled arrows, Yes and No
3. A flowchart has a Start oval but its last box is 'OUTPUT Total' with no arrow leading on. What is the error?
A Missing terminator: the path never reaches a Stop oval
B No error: the output box can end the flowchart
4. Which decision diamond is correct?
A Diamond with 'Mark >= 50?' and two arrows with no labels
B Diamond with 'Mark >= 50?' and arrows labelled Yes and No
5. In a WHILE loop flowchart, the arrow after the loop body joins the box after the decision, so the condition is never checked again. What is wrong?
A The loop arrow joins the wrong place: it must go back to the decision
B Nothing is wrong: loop arrows can join any later box

Match the Pairs

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

Left columnRight column
1A rectangle containing: INPUT Age AThe Yes and No labels are missing, so the reader cannot tell which path is taken when the condition is true or false
2A diamond with only one arrow leaving it BSTART -> INPUT Num -> OUTPUT Num * 2 -> (no STOP)
3A path must finish at a Terminator labelled STOP, so a missing terminator is an error CWrong symbol shape: input and output belong in a parallelogram, not a process rectangle
4Text in a symbol should be a pseudocode statement, not a sentence DProcess box: Work out the total of the numbers
5Decision: Age >= 18 ? with both arrows leaving it unlabelled EThe loop arrow joins the wrong place; it should return to the decision at the top of the loop so the condition is checked again
6WHILE loop: the arrow from the end of the loop body goes to the box after the loop FA decision with one exit: the diamond needs two labelled exits, Yes and No

Definitions

flowchart error

Fill in the Blanks

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

1.
INPUT needs a _____________, not a box
2.
A decision needs a Yes and a __ exit
3.
Every path must end at the ____ terminator
4.
A loop arrow must rejoin before the ________
5.
Write Total _ Total + Mark, not a sentence

Spot the Error

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

Question 1
A Oval: Start
B Rect: INPUT Age
C Diamond: Age >= 18?
D Yes -> Para: OUTPUT Adult
E No -> Para: OUTPUT Minor
F Oval: Stop
Question 2
A Oval: Start
B Para: INPUT Mark
C Diamond: Mark >= 50?
D Para: OUTPUT Pass
E No -> Para: OUTPUT Fail
F Oval: Stop
Question 3
A Oval: Start
B Rect: Count <- 0
C Rect: Add one to the counter
D Para: OUTPUT Count
E Oval: Stop
Question 4
A Rect: Start
B Para: INPUT Price
C Rect: Total <- Price * 1.2
D Para: OUTPUT Total
E Oval: Stop
Question 5
A Oval: Start
B Para: INPUT Score
C Rect: Score > 90?
D Yes -> Para: OUTPUT Top
E No -> Para: OUTPUT Try again
F Oval: Stop

Answer Key

Errors in a flowchart
Section A: Quick Questions
Q1
A — No, input needs a parallelogram
Q2
B — Decision with one exit: it needs two labelled arrows, Yes and No
Q3
A — Missing terminator: the path never reaches a Stop oval
Q4
B — Diamond with 'Mark >= 50?' and arrows labelled Yes and No
Q5
A — The loop arrow joins the wrong place: it must go back to the decision
Section B: Match the Pairs
Q1
A rectangle containing: INPUT Age → Wrong symbol shape: input and output belong in a parallelogram, not a process rectangle
Q2
A diamond with only one arrow leaving it → A decision with one exit: the diamond needs two labelled exits, Yes and No
Q3
A path must finish at a Terminator labelled STOP, so a missing terminator is an error → START -> INPUT Num -> OUTPUT Num * 2 -> (no STOP)
Q4
Text in a symbol should be a pseudocode statement, not a sentence → Process box: Work out the total of the numbers
Q5
Decision: Age >= 18 ? with both arrows leaving it unlabelled → The Yes and No labels are missing, so the reader cannot tell which path is taken when the condition is true or false
Q6
WHILE loop: the arrow from the end of the loop body goes to the box after the loop → The loop arrow joins the wrong place; it should return to the decision at the top of the loop so the condition is checked again
Section C: Definitions
Q1
flowchart error — A mistake in a flowchart, such as the wrong symbol shape, a missing Yes or No label, a path that never reaches Stop, or a loop arrow joining the wrong place.
Section D: Fill in the Blanks
Q1
INPUT needs a parallelogram, not a box
Q2
A decision needs a Yes and a No exit
Q3
Every path must end at the Stop terminator
Q4
A loop arrow must rejoin before the decision
Q5
Write Total ← Total + Mark, not a sentence
Section E: Spot the Error
Q1
B — Input must be drawn in a parallelogram, not a rectangle. A rectangle is the process symbol. The line should be Para: INPUT Age.
Q2
D — The line leaving the decision has no Yes label, so the reader cannot tell when this path is taken. It should be Yes -> Para: OUTPUT Pass.
Q3
C — Statements inside flowchart symbols must be written as pseudocode, not as a sentence. It should be Rect: Count <- Count + 1.
Q4
A — Start and Stop must be drawn in a terminator (oval) symbol. A rectangle is the process symbol. It should be Oval: Start.
Q5
C — A decision with a Yes/No question must be drawn as a diamond, not a rectangle. It should be Diamond: Score > 90?.