New
New
Lesson details
Key learning points
- Trace tables can be used to walkthrough and understand the logic of an algorithm.
- Trace tables can be used to help find logical errors in algorithms.
Keywords
Trace table - a tool used to track the values of variables and the flow of execution in an algorithm or program, step by step
Error - a mistake or unexpected behaviour in a program that prevents it from working correctly
Modulo - an operation that gives you the remainder when one number is divided by another
Common misconception
Using trace tables guarantees correct logic and code.
Trace tables can be subject to human error and can be impractical to use for complex algorithms.
Initially, pupils can struggle to keep track of variable changes in trace tables. Model the completion of trace tables slowly by narrating the changes as they happen.
Teacher tip
Equipment
Licence
This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).
Lesson video
Loading...
Prior knowledge starter quiz
Download quiz pdf
6 Questions
Q1.What is a set of step-by-step instructions to solve a problem called?
What is a set of step-by-step instructions to solve a problem called?
Q2.Why is it helpful to develop an algorithm’s logic before coding?
Why is it helpful to develop an algorithm’s logic before coding?
It wastes time.
It creates unnecessary steps.
It’s only useful for flowcharts.
Q3.What is a diagram that represents logic or data (or similar alternatives)?
What is a diagram that represents logic or data (or similar alternatives)?
Q4.What does decomposition involve?
What does decomposition involve?
ignoring the problem entirely
writing a program directly
creating a flowchart
Q5.What is abstraction in computational thinking?
What is abstraction in computational thinking?
focusing on irrelevant details
writing a program in plain language
ignoring the important parts of a problem
Q6.What is a way to express an algorithm in plain language (or similar alternatives)?
What is a way to express an algorithm in plain language (or similar alternatives)?
Assessment exit quiz
Download quiz pdf
6 Questions
Q1.Match the terms with their definitions.
Match the terms with their definitions.
a tool to track variable values and execution flow
a mistake in a program that prevents it from working correctly
an operation that gives the remainder when dividing two numbers
mistakes made by people when creating trace tables
the process of running an algorithm or program
Q2.What is a trace table used for?
What is a trace table used for?
to draw flowcharts
to write pseudocode
to translate algorithms into code
Q3.What is a common limitation of trace tables?
What is a common limitation of trace tables?
they are always correct
they only work for pseudocode
they cannot track variable values
Q4.What is the result of 10%3?
What is the result of 10%3?
Q5.Arrange these steps into the correct order for creating a trace table.
Arrange these steps into the correct order for creating a trace table.
Q6.Why might trace tables be impractical for complex algorithms?
Why might trace tables be impractical for complex algorithms?
they are too simple to use
they cannot track variables
they only work for pseudocode