7.3 Explaining the purpose of an algorithm
An algorithm sets out the steps needed to complete a task. Topic 7.3 focuses on reading a flowchart or pseudocode and explaining both the overall purpose of the algorithm and the individual processes used to achieve that purpose.
Explaining what an algorithm does
An algorithm is a sequence of steps used to complete a given task. The source shows algorithms in two familiar forms: flowcharts and pseudocode. When you study an algorithm, you should be able to identify:
| What to identify | Meaning |
|---|---|
| Purpose | The overall task or result the algorithm is intended to achieve. |
| Processes | The individual actions and checks carried out to achieve that purpose. |
The aim is not only to recognise individual statements. You need to connect the steps together so you can explain what the whole algorithm is doing.
Textbook example: output an alarm sound
The textbook example has one clear purpose: output the alarm sound at the appropriate time. It does this by repeatedly checking the current time until it matches the stored alarm time.
REPEAT Wait (10) Get (Time) UNTIL Time = Alarm_Time OUTPUT AlarmSound
The processes are:
- wait for 10 seconds
- get the current time from the system clock
- compare the current time with the alarm time
- repeat the checking while the times do not match
- output the alarm sound when the times match
Reading the same algorithm as a flowchart and pseudocode
Activity 7.6 shows the same algorithm in two forms. Both versions input two numbers, compare them, and output the larger value.

The decision is Num1 > Num2. If this is true, the first number is printed as the largest. Otherwise, the second number is printed as the largest.
Tracing the textbook values
If Num1 = 7 and Num2 = 18, the test 7 > 18 is false. The algorithm follows the no/ELSE path and outputs:
18 is largest