AlgorithmsTopic Summary

Knowledge Organiser: Trace Tables and Pseudocode Syntax

Part of Trace Tables · GCSE GCSE Computer Science revision

This topic summary covers Knowledge Organiser: Trace Tables and Pseudocode Syntax within Trace Tables for GCSE Computer Science. Revise Trace Tables in Algorithms for GCSE Computer Science with 15 exam-style questions and 8 flashcards. This topic appears regularly enough that it should still be part of a steady revision cycle. 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.

Topic position

Section 8 of 8

Practice

15 questions

Recall

8 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

Keep building this topic

Read this section alongside the surrounding pages in Trace Tables. That gives you the full topic sequence instead of a single isolated revision point.

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 8 spaced repetition flashcards. Free until your GCSEs.

Try PrepWise Free