Algorithms and flowcharts
An algorithm is a precise set of steps to solve a problem. Every program is built from three basic structures.
Three building blocks
Selection: a decision chooses which steps run, such as IF ... ELSE.
Iteration: steps repeat, using a loop such as FOR or WHILE.
Flowchart symbols
| Shape | Meaning |
|---|---|
| Rounded rectangle (oval) | Start or end (terminator) |
| Rectangle | Process, such as a calculation |
| Diamond | Decision, with yes and no paths |
| Parallelogram | Input or output |
| Arrow | Direction of flow |
Tracing an algorithm
What is output? total = 0. FOR i FROM 1 TO 4: total = total + i. OUTPUT total.
- i = 1: total = 1
- i = 2: total = 3
- i = 3: total = 6
- i = 4: total = 10
Answer: 10
Algorithms use sequence, selection and iteration. Flowchart symbols: oval for start and end, rectangle for process, diamond for decision, parallelogram for input and output. Trace tables track variables.
- Algorithm
- A precise sequence of steps to solve a problem.
- Sequence
- Instructions carried out one after another in order.
- Selection
- Choosing which code runs using a condition, such as if, elif and else.
- Iteration
- Repeating code, or visiting each item of a data structure in turn.
- Flowchart
- A diagram of an algorithm using standard symbols joined by arrows.
- Trace table
- A table that tracks the value of each variable as an algorithm runs.
All GCSE and International GCSE Computer Science key terms and definitions โ
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.
Which programming construct chooses between different paths?
- Iteration
- Selection
- Sequence
- Abstraction
Show the answer
Answer: Selection
Selection uses IF to choose a path.
Which flowchart symbol shows a process, such as total = total + 1?
- Diamond
- Rectangle
- Parallelogram
- Oval
Show the answer
Answer: Rectangle
A rectangle shows a process.
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.
- Pearson Edexcel GCSE Computer Science (1CP2) specification, topic 1.2.1, 6.1.3
- Pearson Edexcel International GCSE Computer Science (4CP0) specification, topic 1.1.1, 1.1.2, 1.1.3
Facts checked against the sources below, 17 October 2026. Last updated 2 October 2026. Spotted a mistake? Tell us and we will fix it.
What do exam command words like explain and evaluate mean? โ