Trace Tables — 20 Practice Questions
20 trace table practice questions for OCR GCSE Computer Science (J277/02), with full completed answers and guidance.
All algorithms are written in OCR Exam Reference Language (ERL), exactly as students will see in the exam. Questions progress from simple sequence and selection through to iteration, nested loops, string operations, and array processing — building the skill and confidence needed to tackle trace table questions under exam conditions.
Includes:
40 marks across 20 questions, split into three progressive sections
Section 1: sequence, selection, if/elseif/else, and AND conditions
Section 2: FOR loops, WHILE loops, DO UNTIL, and loops with arrays
Section 3: mixed algorithms, string handling, nested loops, and two reverse questions where students read a completed trace and identify the output or an error
Full completed trace tables in the answers section — every cell filled, every line numbered
Watch out boxes targeting the specific mistakes flagged in OCR examiner reports (wrong line numbers, spurious output, off-by-one errors, stale variable values)
A marking note explaining how line number errors are handled — reassuring for students who know how OCR awards follow-through marks
A focused exam skill builder — different in format from the topic-based resources in this series, and ideal for targeted practice in the weeks before the exam.
Print-ready and suitable for independent revision, homework, or structured classroom practice.





