Plenary Studio
FeaturesComputer ScienceCode builder

OCR Exam Reference Language code tracing

OCR Exam Reference Language is the pseudocode OCR uses in the J277 GCSE Computer Science papers, and it is one of the three ways the code builder can show a snippet. Set the board to OCR and every question renders in the reference language, with Python one click away for comparison.

app.plenarystudio.co.uk
MDMr Davies
Code Builder
State the output of this code.
1total = 0
2for i = 1 to 6
3 total = total + i
4next i
5print(total)
Adds the whole numbers from 1 to 6 and prints the running total.

A hand-built replica of the real builder page, not a screenshot. Every control shown exists in the product.

Part of the Code builder and AQA pseudocode trace tables pages.

Why this works in Computer Science

The loop above is written the way the OCR paper writes it. A count controlled loop runs from its first value to its last inclusive and closes with next i, a list is declared with the array keyword, its size is read with .length, and equality is tested with two equals signs. Pupils who have only seen Python read the inclusive bound wrong and count one trip too few, which is exactly the slip a trace table exposes.

Because the code is built by construction, switching the board changes the notation and nothing else, so you can put the reference language and the Python side by side and ask what differs. Substring takes a start and a count rather than a start and an end, MOD and DIV are written as words, and there is no for each loop, so a loop over a list is always indexed. Those are the details the mark scheme rewards, and the class meets them here before the exam.

More Computer Science resources

Sign-ups open

Teach with us
and start building.

Plenary Studio is open to every UK secondary teacher. Sign up free, no card details, and build your first resource in minutes. Join the new wave of teachers bringing Plenary Studio into their classroom.

One inbox, no marketing list. We read every email.

Say hello.

We’d love to hear from teachers, heads of department, and anyone curious about where this is going.

hello@plenarystudio.co.uk

Opens your email client. Nothing is sent to us until you press send there.