Knowledge Organiser: Trace Tables and Pseudocode Syntax

Part of Trace Tables · Section 8 of 8

Topic SummaryUnit: 3.1 Fundamentals of AlgorithmsGCSE

This topic summary covers Knowledge Organiser: Trace Tables and Pseudocode Syntax within Trace Tables for GCSE Computer Science. Revise Trace Tables in 3.1 Fundamentals of Algorithms for GCSE Computer Science with 15 exam-style questions and 8 flashcards. This topic shows up very often in GCSE exams, so students should be able to explain it clearly, not just recognise the term. It is section 8 of 8 in this topic. Use this topic summary to connect the idea to the wider topic before moving on to questions and flashcards.

Knowledge Organiser: Trace Tables and Pseudocode Syntax

Key Terms
  • Trace table: A table used to track the value of variables at each step of an algorithm
  • Dry run: Manually stepping through an algorithm (using a trace table) without running it on a computer
  • Assignment: Giving a variable a value (e.g. score = 0)
  • Iteration: Repeating a block of code (FOR loop or WHILE loop)
  • Selection: Choosing between paths using IF…THEN…ELSE…ENDIF
  • Comparison operators: == (equal), != (not equal), < > <= >= (less/greater)
Must-Know Facts
  • Trace tables have one column per variable plus an output column
  • Each row records variable values AFTER executing one line or iteration
  • FOR loop: for i = 1 to 10 … next i (runs a fixed number of times)
  • WHILE loop: while condition … endwhile (runs while condition is true)
  • String operations: string.length, string.substring(start, length), string.upper
  • Logical operators used in conditions: AND, OR, NOT
Key Concepts
  • Trace table: column per variable → fill in values row by row as algorithm executes
  • IF needs ENDIF; FOR needs NEXT; WHILE needs ENDWHILE — always close what you open
  • Pseudocode comparison: == (equal to), != (not equal to), <= (less than or equal)
  • Use trace tables in exams to show understanding of algorithm behaviour with given inputs
Common Mistakes
  • Only writing the final variable values: A trace table must show variable values after EVERY step or iteration — skipping intermediate rows loses marks
  • Missing the output column: If an algorithm includes a print/output statement, the trace table must have an output column — forgetting it is a very common omission
  • Updating all variables in one row simultaneously: Variables are updated one line at a time — each assignment gets its own row; copying a previous value into later rows when it hasn't changed is also expected
  • Using = instead of == in conditions: In pseudocode, == is comparison and = is assignment — writing conditions with = instead of == shows a misunderstanding of the syntax
  • Forgetting closing keywords in pseudocode: IF must end with ENDIF, FOR with NEXT, WHILE with ENDWHILE — omitting closing keywords in written answers loses structure marks

Practice questions for Trace Tables

What is the main purpose of a trace table?

  • A. To write pseudocode more quickly
  • B. To track how variable values change as an algorithm executes
  • C. To convert pseudocode into Python code
  • D. To measure how fast an algorithm runs
1 markfoundation

Explain how a programmer uses a trace table to test an algorithm. Your answer should refer to variables and errors.

3 marksstandard

Quick recall flashcards

What is pseudocode?
Language-independent algorithm description using English-like syntax
What does != mean?
Not equal to

15 questions on Trace Tables — practise free

Instant marking, adaptive difficulty and spaced-repetition flashcards — all aligned to your exam board.

Start revising free →