Appearance
B2 · Flowcharts
Spec reference: Section B - Standard Methods in Algorithm Development Key idea: Represent algorithms visually using standard symbols connected by arrows.
Flowcharts
What is a flowchart?
A flowchart is a visual representation of an algorithm. It uses standardised shapes connected by arrows to show the flow of execution, including decisions, loops and processes.
Key definition
Flowchart - a diagram that uses standardised symbols to represent the steps of an algorithm.
Standard flowchart symbols
| Symbol | Shape | Meaning |
|---|---|---|
| Terminator | Rounded oval | Start or End of the algorithm |
| Process | Rectangle | An action or calculation |
| Decision | Diamond | A yes/no question that branches the flow |
| Input/Output | Parallelogram | Data going in (user input) or out (display) |
| Flow arrow | Arrow | Shows direction of execution |
Exam tip
Always label the two exits from a decision diamond as Yes and No (or True and False). Never leave them unlabelled.
Example 1: Sequence
Problem: Ask the user for a number, double it, and display the result.
Every step follows in a straight line from top to bottom. No decisions, no loops. This is a sequence.
Example 2: Selection (decision)
Problem: Ask for a student mark. If it is 50 or above, output "Pass". Otherwise output "Fail".
The diamond creates two separate paths. Both must eventually reach END.
Example 3: Iteration (loop)
Problem: Output the numbers 1 to 5.
The arrow from SET count = count + 1 loops back up to the condition. When the condition becomes false (count > 5), the flow exits.
Exam-style worked example
Scenario: A vending machine dispenses a drink if the user inserts at least £1.50. If they insert more, it gives change. If less, it returns the money.
This combines selection (two decisions) and sequence (steps between decisions).
Implementing flowcharts correctly
- One entry, one exit per process box - arrows must not branch from process boxes (only from decision diamonds).
- Arrows show direction - always put arrowheads so the reader knows which way to follow the path.
- Every decision must have exactly two labelled exits - Yes/No or True/False.
- Start and End must use terminators - not rectangles.
- Every path must lead to an end - do not leave any arrows dangling.
Flowcharts vs pseudocode
| Flowchart | Pseudocode | |
|---|---|---|
| Format | Visual diagram | Written text |
| Best for | Showing decision logic clearly | Complex algorithms with many variables |
| Easy to | See the overall flow | Write and modify quickly |
| Hard to | Show detail in computations | Visualise branching paths |
Both describe the same algorithm. Choose the one asked for in the question.
Summary
| Term | Meaning |
|---|---|
| Flowchart | Visual algorithm representation using standard symbols |
| Terminator | Oval - marks start and end |
| Process box | Rectangle - an action or calculation |
| Decision diamond | Diamond - a yes/no branch |
| Input/Output | Parallelogram - user input or screen output |
Test Yourself
Question 1 of 5
Which flowchart symbol is used to represent a YES/NO decision?