Earn the trace, logic and binary marks in OCR A-level Computer Science.

H446 lessons you can step through, questions that name every slip, and a free trace table trainer.

Built by Cambridge students

Try an exam-style trace

Structured question 110 marks

A number sequence

The program below builds a sequence of numbers.

a = 1b = 1for n = 1 to 4    c = a + b    a = b    b = cnext nprint(b)
(a) Complete4 marks

the trace table: one row for the end of each pass, then one row for the print.

nabcoutput
1122
(b) State1 mark

the value printed if the loop runs for n = 1 to 6.

(c) Explain2 marks

why the order of lines 5 and 6 matters.

0 words
(d) Write3 marks

a loop that prints every even number from 2 to 20.

Why it works

Programs you run

Step through the code and watch every variable change, then fill the trace table yourself.

The slip behind every wrong answer

Each wrong option names the mistake that makes it tempting.

Written answers read by Mia

She quotes the sentence that earns each mark and flags the claim that loses one.

In the course now

  • 16 interactive lessons
  • 206 practice questions
  • 77 units on the course map

See the whole course map

Free while the course grows

Every lesson and question opens with a free account. The full course and its price come later.

Start the free lesson

Independent practice for OCR A-level Computer Science (H446), not endorsed by OCR.

Privacy · Terms