Skip to main content
EnglandComputer ScienceSyllabus dot point

How do you design an algorithm using pseudocode and flowcharts, and how do you trace one to check it works?

Designing, expressing and tracing algorithms using pseudocode and flowcharts, and using a trace table to follow an algorithm step by step.

An Eduqas GCSE Computer Science answer on designing and expressing algorithms in pseudocode and flowcharts, the standard flowchart symbols, and using a trace table to follow an algorithm step by step and find its output.

Generated by Claude Opus 4.811 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. Pseudocode and flowcharts
  3. The flowchart symbols
  4. Trace tables
  5. The same algorithm as a flowchart
  6. Try this

What this dot point is asking

Eduqas wants you to design and express algorithms in pseudocode and flowcharts, know the standard flowchart symbols, and trace an algorithm with a trace table to find its output and check it works. Trace-table questions in particular are worth several method marks and appear regularly.

Pseudocode and flowcharts

A simple pseudocode algorithm to find the larger of two numbers:

input a
input b
if a > b then
  output a
else
  output b
endif

The flowchart symbols

Trace tables

The same algorithm as a flowchart

The summing algorithm above can be drawn as a flowchart: a terminator (start), a process to set total = 0 and i = 1, a decision diamond asking "is i more than 4?", and if not, a process total = total + i then i = i + 1 with an arrow looping back to the decision. When the decision is yes, an input/output symbol outputs total, and a final terminator ends it. The flowchart and the pseudocode describe exactly the same steps; the flowchart makes the loop and the decision easy to see, while the pseudocode is quicker to write and closer to code.

Try this

Q1. State which flowchart symbol represents a decision. [1 mark]

  • Cue. A diamond (a yes/no branch).

Q2. State what a trace table is used for. [1 mark]

  • Cue. To follow an algorithm step by step by recording the variables, to check it works and find its output.

Q3. For the algorithm x = 5; x = x + 3; x = x * 2; output x, state the output. [2 marks]

  • Cue. x=5x = 5, then 88, then 1616; output 1616.

Exam-style practice questions

Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Eduqas Component 1, 20225 marksComplete a trace table for the following algorithm and state the final output. total = 0; for i = 1 to 4; total = total + i; next i; output total.
Show worked answer →

Build a trace table with columns for i and total, writing a row each time the loop body runs.

Start: total = 0. Pass 1: i = 1, total = 0 + 1 = 1. Pass 2: i = 2, total = 1 + 2 = 3. Pass 3: i = 3, total = 3 + 3 = 6. Pass 4: i = 4, total = 6 + 4 = 10.

Final output: 10. Markers award marks for the correct values of i and total at each pass and the final output. A common error is starting i at 0 or stopping after three passes.

Eduqas Component 1, 20234 marksDescribe the purpose of the standard flowchart symbols for a terminator, a process, a decision and an input/output, and state how the flow between them is shown.
Show worked answer →

Terminator (rounded box/oval): marks the start or end of the algorithm (1 mark).

Process (rectangle): an action or calculation, such as total = total + 1 (1 mark).

Decision (diamond): a yes/no question that branches the flow two ways (1 mark).

Input/output (parallelogram): reading in data or outputting a result; flow is shown by arrows joining the symbols in order (1 mark).

Markers reward each symbol matched to its meaning and the point that arrows show the order of flow.

Related dot points

Sources & how we know this