Algorithm design is the skill of turning a written task into a clear set of steps that someone else could follow and get the right answer every time. It is not about memorising solutions. It is about breaking the task down, naming what goes in and out, and testing the steps before you trust them.
This module follows automation and emerging systems and comes before repetition and arrays in the Computer Science learning guide. The tracing you practise here is the same tracing used in every later algorithm question.
What should you know before starting?
You should know what a variable is, how an assignment such as Total ← Total + 5 changes it, and how to read a simple IF statement. If you are unsure, step through a small algorithm in the pseudocode trace trainer and watch each variable change.
You do not need to know any Python. The module uses Cambridge-style pseudocode, and Python appears only where it helps you see the same logic in another form.
One orienting example
A teacher enters five quiz marks, each out of 20. The program should say PASS if the average is at least 10, otherwise FAIL.
Break it into parts: collect five marks, add them, divide by five, compare with 10, output the word. With the marks 12, 15, 9, 18 and 16 the total is 70, the average is 14 and the output is PASS.
Total ← 0
FOR Count ← 1 TO 5
INPUT Mark
Total ← Total + Mark
NEXT Count
Average ← Total / 5
IF Average >= 10 THEN
OUTPUT "PASS"
ELSE
OUTPUT "FAIL"
ENDIF
Each lesson in this module adds one habit to that picture: splitting, specifying, tracing, testing boundaries and explaining.
In what order should you study the lessons?
- Decompose a task into subproblems: learn to split a task so each part is small enough to test.
- Define inputs outputs and constraints: state exactly what goes in, what comes out and what is allowed.
- Trace a sequence with a state table: follow the variables row by row so you can check any algorithm.
- Design a selection with boundary cases: write IF structures and test the values where the decision changes.
- Explain an algorithm independently of a programming language: describe the logic in plain steps and in pseudocode.
Then attempt the mixed practice set and record wrong answers in the mistake log. The safe Python sandbox lets you compare a pseudocode trace with a short program once you are comfortable with both.
What traps catch students in this topic?
- A subproblem that is just the whole task again. “Work out the result” cannot be tested. Split it until each part has one clear job.
- Skipping the starting values. A trace that begins after the first update hides initialisation errors.
- Using more than or equal to by accident. The symbols
>and>=give different answers at exactly one value. - Testing only typical data. Most faults live at the edges, such as 0, the limit itself, and one step either side.
- Describing code instead of logic. An explanation that depends on one language’s built-in function does not show that you understand the algorithm.
How to use the practice set
Work on paper. Write each trace table before you open an answer, and predict the final output first. Compare the working, not just the last line, then note which lesson each mistake belongs to.
If you want a teacher to look at how you design and check your own algorithms, our online one-to-one Computer Science tuition is built around tracing and debugging your own attempts.