Explaining a flowchart

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

Explaining a flowchart

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What is the first step when explaining a flowchart?
A Start at the Start terminator and follow the flow lines
B Start with the last symbol and work backwards
2. A decision diamond contains 'Is Age >= 18?'. How should you describe it?
A It tests whether Age is 18 or more, then the Yes path or No path is followed
B It sets Age to 18 and moves on
3. Which describes the Yes and No paths leaving a decision symbol?
A Both paths always lead to the same step and are run one after the other
B Each path is labelled and leads to different steps depending on the result of the test
4. A flow line leaves a decision and goes back up to a symbol earlier in the flowchart. What does this show?
A A loop, because some steps are repeated
B The program has finished
5. A parallelogram contains 'Enter Mark'. How do you name this in your explanation?
A An output: the program displays a Mark
B An input: the user enters a Mark

Match the Pairs

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

Left columnRight column
1Decision diamond: Is Total > 100? ADecision: Count < 10? Yes -> back to the INPUT symbol, No -> OUTPUT Total
2Start -> INPUT Num -> Count <- Count + 1 -> Stop BFollow the flow lines in order: read in Num, add 1 to Count, then end the flowchart.
3A flow line that goes back up to an earlier symbol shows a loop, so the same steps repeat until a decision sends the flow on. CINPUT Mark ... OUTPUT Grade
4Naming the inputs and outputs: the parallelogram symbols show the data entered and the results displayed. DA diamond does not read input. It is a decision that tests a condition and has Yes and No paths. Input uses a parallelogram.
5Explanation: 'The diamond reads a number from the user, then the flowchart ends.' EA decision that tests the value of Total. One flow line leaves for Yes and another leaves for No.
6Explanation: 'The flowchart adds up numbers and outputs the total.' (no mention of the decision or loop) FThe explanation skips what the decision tests, the Yes and No paths, and the loop, so it does not follow every flow line.

Definitions

Explaining a flowchart

Fill in the Blanks

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

1.
Mark >= 50? ___ -> OUTPUT "Pass" No -> OUTPUT "Fail"
2.
Mark >= 50? Yes -> OUTPUT "Pass" No -> ______ "Fail"
3.
START _____ Age Age >= 18?
4.
Count ← 1 Total ← Total + Count Count __ 5? Yes -> back to line 2
5.
INPUT Num _____ ← Total + Num OUTPUT Total

Spot the Error

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

Question 1
A START
B INPUT Age
C Age <= 18 ?
D Yes: OUTPUT Adult
E No: OUTPUT Child
F END
Question 2
A START
B OUTPUT Mark
C Mark >= 50 ?
D Yes: OUTPUT Pass
E No: OUTPUT Fail
Question 3
A START
B Count ← 1
C OUTPUT Count
D Count ← Count - 1
E Count > 5 ? No: go to line 3
F Yes: END
Question 4
A START
B Total ← 0
C INPUT Num
D Total ← Total * Num
E Num = 0 ? No: go to line 3
F Yes: OUTPUT Total
Question 5
A END
B INPUT Price
C Price > 100 ?
D Yes: OUTPUT Expensive
E No: OUTPUT Cheap

Answer Key

Explaining a flowchart
Section A: Quick Questions
Q1
A — Start at the Start terminator and follow the flow lines
Q2
A — It tests whether Age is 18 or more, then the Yes path or No path is followed
Q3
B — Each path is labelled and leads to different steps depending on the result of the test
Q4
A — A loop, because some steps are repeated
Q5
B — An input: the user enters a Mark
Section B: Match the Pairs
Q1
Decision diamond: Is Total > 100? → A decision that tests the value of Total. One flow line leaves for Yes and another leaves for No.
Q2
Start -> INPUT Num -> Count <- Count + 1 -> Stop → Follow the flow lines in order: read in Num, add 1 to Count, then end the flowchart.
Q3
A flow line that goes back up to an earlier symbol shows a loop, so the same steps repeat until a decision sends the flow on. → Decision: Count < 10? Yes -> back to the INPUT symbol, No -> OUTPUT Total
Q4
Naming the inputs and outputs: the parallelogram symbols show the data entered and the results displayed. → INPUT Mark ... OUTPUT Grade
Q5
Explanation: 'The diamond reads a number from the user, then the flowchart ends.' → A diamond does not read input. It is a decision that tests a condition and has Yes and No paths. Input uses a parallelogram.
Q6
Explanation: 'The flowchart adds up numbers and outputs the total.' (no mention of the decision or loop) → The explanation skips what the decision tests, the Yes and No paths, and the loop, so it does not follow every flow line.
Section C: Definitions
Q1
Explaining a flowchart — Follow the flow lines from Start, say what each symbol does and what each decision tests (Yes and No paths), then state the overall purpose.
Section D: Fill in the Blanks
Q1
Mark >= 50? Yes -> OUTPUT "Pass" No -> OUTPUT "Fail"
Q2
Mark >= 50? Yes -> OUTPUT "Pass" No -> OUTPUT "Fail"
Q3
START INPUT Age Age >= 18?
Q4
Count ← 1 Total ← Total + Count Count <= 5? Yes -> back to line 2
Q5
INPUT Num Total ← Total + Num OUTPUT Total
Section E: Spot the Error
Q1
C — The decision must test Age >= 18 so that the Yes path (Adult) is only taken by people aged 18 or over. With <= 18, young children would follow the Yes path and be called adults.
Q2
B — Data enters the flowchart through an INPUT symbol. OUTPUT Mark would display a value that has not been read yet, so the decision has nothing to test. It should be INPUT Mark.
Q3
D — The loop ends when Count > 5, so Count must go up each time round. Subtracting 1 makes Count smaller, the test never becomes Yes and the loop never ends. It should be Count ← Count + 1.
Q4
D — The loop going back to the INPUT symbol is a totalling loop, so each Num must be added to Total. Multiplying would not give a running total. It should be Total ← Total + Num.
Q5
A — To explain a flowchart you begin at the Start terminator. The first symbol must be START, not END, because END is where the flow finishes.