Menu
Coddy logo textTech

OCR Pseudocode Editor & Runner

Write OCR Exam Reference Language, run it right in your browser, and step through every line while you watch the variables change.

What is pseudocode?

Pseudocode is a plain-language way of writing out the logic of a program before you write real code. It uses structured keywords — IF, FOR, WHILE, PROCEDURE — so the steps are unambiguous, but it drops the fiddly syntax of a specific programming language. That makes it perfect for planning algorithms, studying for exams, and explaining ideas.

This editor follows the OCR GCSE Exam Reference Language (ERL): = assignment, print() and input(), if/elseif/else, for…next, while…endwhile, do…until, switch/case/default, and procedure/function blocks with return. Press Run to see the output, then step through one line at a time.

OCR pseudocode syntax at a glance

ConstructSyntaxExample
Assignmentx = valuetotal = 0
Outputprint(expr)print("Total: " + str(total))
Inputx = input(prompt)name = input("Name?")
Selection (if / else)if … then … else … endifif n > 5 then … endif
Multi-way selectionswitch x: case v: … default: … endswitchswitch day: case "Sat": … endswitch
Count-controlled loopfor i = a to b … next ifor i = 1 to 10 … next i
Pre-condition loopwhile cond … endwhilewhile n > 0 … endwhile
Post-condition loopdo … until conddo … until n == 0
Procedure / subroutineprocedure name(params) … endproceduregreet("Ada")
Function that returns a valuefunction name(params) … return … endfunctionreturn n * 2
Comment// comment// swap the values

Pseudocode FAQ

What is pseudocode?

Pseudocode is a plain-language way of describing the steps of an algorithm, using structured keywords like IF, FOR and WHILE without the strict syntax of a real programming language. It lets you plan and communicate logic before writing code.

What is OCR Exam Reference Language?

OCR Exam Reference Language (ERL) is the defined pseudocode used in OCR GCSE Computer Science (J277) exam papers. It looks close to Python — x = 5, print("hi"), input() — but with explicit block ends like endif, endwhile and endprocedure.

Is the pseudocode editor free?

Yes. The pseudocode editor and runner are completely free, run in your browser, and need no sign-up or installation.

Coddy programming languages illustration

Go from pseudocode to real code with Coddy

GET STARTED