Homeschool Guide: These lesson plans are a guide for parents. Content may contain errors — always cross-reference with official exam board specifications.

trace tables

FoundationHigherAll Boards

4 detailed 50-minute lessons with teaching scripts, worked examples, parent guides, and assessment criteria.

Fastmail

Lesson Overview

Total Lessons: 4
Tier: Foundation and Higher
Duration: 50 minutes per lesson (200 minutes total)
Exam Boards: AQA, Edexcel, OCR, Eduqas, CCEA

Learning Objectives

Prerequisites

Materials & Equipment

Lesson 1: Introduction: trace tables

Duration: 50 minutes

Starter Activity (5 minutes)

Quick Recall

Write down everything you already know about trace tables. Then check against the key terms: Setting up a trace table, Exam technique, Tip. Use a mini-whiteboard or paper.

Main Content (35 minutes)

Parent/Teacher Guide:
Before lesson: Read the script below. Pre-teach key vocab: Setting up a trace table, Exam technique, Tip.
If stuck: Re-read the revision notes (link above), then break the content into smaller steps.
Extension: See the Stretch & Challenge ideas in Lesson 4.
Teaching Script (35 mins):
Mins 0-5 - Hook: "Today: trace tables. By the end you will be able to answer exam questions on it unaided. It connects to the rest of Computer Science because the ideas here recur across the spec."
Mins 5-20 - Direct Instruction: Work through the core ideas below one at a time; after each, ask your student to explain it back in their own words.
Mins 20-30 - Guided Practice: Model the worked example together, then let your student attempt the first practice question with guidance.
Mins 30-35 - Independent Practice: 2-3 practice questions from Lesson 3 below, with immediate feedback.
First Look

Start with the revision notes summary, then attempt: Complete a trace table for this algorithm with input num = 7:

Plenary (5 minutes)

Check Out

Your student states one thing they learned and one question they still have about trace tables.

Lesson 2: Core Concepts: trace tables

Duration: 50 minutes

Starter Activity (5 minutes)

Review Previous Lesson

Quick recap: write 3 key points from Lesson 1 on trace tables. Check them against the notes below.

Main Content (35 minutes)

Definition: A trace table is a table used to record the value of variables each time they change as an algorithm is executed step by step. It helps you understand how an algorithm works, find logic errors, and determine what an unknown algorithm does.
Setting up a trace table: Create a column for each variable in the algorithm, plus a column for any OUTPUT statements. Each row represents one execution step where a variable changes.
Exam technique: When given an unknown algorithm, create a trace table and look at the pattern of values. The OUTPUT and how variables change will reveal what the algorithm does.
Tip: When looking at a completed trace table, examine the OUTPUT column and look for patterns in how variables change. Common patterns include: counting, accumulating (sum), finding maximum/minimum, searching, and computing remainders.
GCSE Computer Science Exam Tips: Always create a column for EVERY variable in the algorithm, plus any output. Update values row by row as each line of code executes. For loops, record each iteration separately. For IF statements, show the condition evaluation (TRUE/FALSE). Don't skip rows even if a variable doesn't change — write the same value. If asked to find an error in code, completing a trace table will reveal where the logic goes wrong.
TermMeaningExample
Initial--
Initial-0
111
222
333
444
End--
Initial--

Practice (10 minutes)

Q: Complete a trace table for this algorithm with input num = 7:

Answer: i result - 0 1 1 2 3 3 6 4 10 5 15 6 21 7 28 OUTPUT: 28 (This calculates the sum 1+2+3+4+5+6+7 = 28)

Plenary (5 minutes)

Explain Back

Your student teaches the key points back to you without looking. Fill any gaps immediately.

Lesson 3: Application: trace tables

Duration: 50 minutes

Starter Activity (5 minutes)

Quick Recall

Recall the key terms: Setting up a trace table, Exam technique, Tip. Define each in one sentence.

Main Content (35 minutes)

Parent/Teacher Guide: Let your student attempt each question alone first, then compare with the model answer. Award method marks for correct working even if the final answer is wrong.

Q1: Complete a trace table for this algorithm with input num = 7:

Answer: i result - 0 1 1 2 3 3 6 4 10 5 15 6 21 7 28 OUTPUT: 28 (This calculates the sum 1+2+3+4+5+6+7 = 28)

Q2: What does the following algorithm compute? Use a trace table with x = 24, y = 6.

Answer: The algorithm counts how many times y fits into x - it performs integer division (24 DIV 6 = 4). The OUTPUT is 4.

Q3: Complete a trace table for the following algorithm with the array [4, 1, 8, 3]:

Answer: Initial: min = 4. i=1: numbers[1]=1, 1 1, no change. i=3: numbers[3]=3, 3>1, no change. OUTPUT: 1 (the minimum value).

Q4: Explain why trace tables are useful for debugging.

Answer: Trace tables let you step through an algorithm line by line, recording variable values. This allows you to compare what you expected to happen with what actually happens, making it easy to spot where a logic error occurs.

Q5: A trace table shows a variable that increases by 1 each iteration. What is the algorithm most likely doing?

Answer: It is most likely counting. A variable that increments by 1 each step is typically a counter.

Plenary (5 minutes)

Error Review

Review any questions answered incorrectly. Identify whether the error was knowledge, method, or reading the question.

Lesson 4: Exam Practice: trace tables

Duration: 50 minutes

Starter Activity (5 minutes)

Command Words

Review what these command words require: state (one point), describe (say what happens), explain (say why), compare (both sides), evaluate (judgement).

Main Content (35 minutes)

Extended Answer

Extended question: Full-Mark Response The following pseudo-code processes an array: FOR i ← 1 TO 4 IF numbers[i] > max THEN max ← numbers[i] ENDIF NEXT i. Given numbers = [3, 7, 2, 9] and max = 0 initially, complete a trace table showing the value of i, numbers[i], max and the condition result for each iteration. [5 marks] <div class="

Iteration | i | numbers[i] | Condition (numbers[i] > max) | max after 1 | 1 | 3 | 3 > 0 = TRUE | 3 2 | 2 | 7 | 7 > 3 = TRUE | 7 3 | 3 | 2 | 2 > 7 = FALSE | 7 4 | 4 | 9 | 9 > 7 = TRUE | 9 The algorithm finds the maximum value in the array. After all iterations, max = 9.

Exam Tips: Always set up columns before you start tracing - include every variable and an OUTPUT column | Record initial values before the loop begins | Go through the algorithm line by line - don't skip steps | For IF statements, evaluate the condition and only update variables if the condition is TRUE | When asked "what does this algorithm do?", trace it first then describe the overall purpose | Double-check your arithmetic - one wrong calculation will throw off the rest of the table | If asked to find an error, trace the algorithm and compare with what should happen
Common Errors: ✗ Leaving columns out of a trace table because the variable 'doesn't change' ✓ Every variable used in the algorithm must have its own column in the trace table, even if its value doesn't change — you still record the initial value. ✗ Recording output values inside variable columns instead of noting them separately ✓ Outputs should be recorded as they occur, often in a separate 'OUTPUT' column or noted at the side; they are not stored in variables unless explicitly assigned. ✗ Only recording variable values at the end rather than after each iteration ✓ A trace table must show how variable values change after each step or loop iteration, not just the final values — this is how you debug algori
Stretch & Challenge (Grade 8-9):
  • Synoptic links: explain how trace tables connects to another Computer Science topic you have studied
  • Real-world: research one real-world use or example of trace tables
  • Critical: "What are the limitations of the models used in trace tables?"

Plenary (5 minutes)

Assessment Criteria
  • Got it: Confident explanation + correct worked examples
  • Getting there: Main points OK, needs support with detail
  • Not yet: Confused on key concepts - re-run Lesson 2

Homework & Consolidation

Recommended Resources

🎓 Smart Lesson (Guided)