Algorithms and flowcharts
An algorithm is a precise set of steps. Flowcharts show an algorithm as a diagram, so you can follow it before writing any code.
Sequence, selection and iteration
Sequence: steps happen in order, one after another.
Selection: a decision chooses which steps to do (if ... then ... else).
Iteration: steps are repeated (a loop).
Flowchart symbols
| Shape | Meaning |
|---|---|
| Rounded rectangle (terminator) | Start or Stop |
| Rectangle (process) | Do something, such as a calculation |
| Diamond (decision) | A Yes/No question: selection |
| Parallelogram | Input or output |
| Arrow | Shows the order to follow |
Following an algorithm
Input 3: double = 6. 6 is not more than 10. Output 6.
Input 7: double = 14. 14 is more than 10, so 14 - 4. Output 10.
Use the algorithm: INPUT a number, double it, IF the result is more than 10 subtract 4, OUTPUT the result. What is output for 9?
- Double 9: 18.
- 18 is more than 10, so subtract 4: 14.
Answer: 14
Algorithms use sequence, selection and iteration. Flowcharts use a rounded box for start/stop, a rectangle for a process, a diamond for a decision and a parallelogram for input/output.
- AND
- A Boolean operator that gives True (1) only when both inputs are True.
- Algorithm
- A precise set of step-by-step instructions to solve a problem or complete a task.
- Sequence
- Instructions carried out one after another, in order.
- Selection
- Choosing which code to run depending on a condition, using if, elif and else.
- Iteration
- Repeating a set of instructions, using a loop.
- Input
- Data put into a computer, for example from a keyboard, mouse, microphone or sensor.
Try two quick questions
See if it has sunk in. Answers are marked straight away.
2 more questions
Try each one, then tap to check.
A flowchart step asks 'Is the number greater than 10?'. Which shape should it be?
- Rectangle
- Parallelogram
- Diamond
- Rounded rectangle
Show the answer
Answer: Diamond
A Yes/No question is a decision: a diamond.
A flowchart step says 'Display the total'. Which shape should it be?
- Diamond
- Rectangle
- Rounded rectangle
- Parallelogram
Show the answer
Answer: Parallelogram
Output uses a parallelogram.
Check you have got it
Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.
Facts checked against the sources below, 27 October 2026. Last updated 2 October 2026. Spotted a mistake? Tell us and we will fix it.