AQA Pseudocode Editor & Runner
Write AQA-style pseudocode, 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 AQA assessment conventions: the ← assignment arrow, OUTPUT and USERINPUT, IF/ELSE/ENDIF, FOR…ENDFOR, WHILE…ENDWHILE, REPEAT…UNTIL, and SUBROUTINE…ENDSUBROUTINE with RETURN. Press Run to see the output, then step through one line at a time.
AQA pseudocode syntax at a glance
| Construct | Syntax | Example |
|---|---|---|
| Assignment | x ← value | total ← 0 |
| Output | OUTPUT expr, expr | OUTPUT "Total: ", total |
| Input | x ← USERINPUT | name ← USERINPUT |
| Selection (if / else) | IF … THEN … ELSE … ENDIF | IF n > 5 THEN … ENDIF |
| Count-controlled loop | FOR i ← a TO b … ENDFOR | FOR i ← 1 TO 10 … ENDFOR |
| Pre-condition loop | WHILE cond … ENDWHILE | WHILE n > 0 … ENDWHILE |
| Post-condition loop | REPEAT … UNTIL cond | REPEAT … UNTIL n = 0 |
| Procedure / subroutine | SUBROUTINE name(params) … ENDSUBROUTINE | greet("Ada") |
| Function that returns a value | SUBROUTINE … RETURN value … ENDSUBROUTINE | RETURN n * n |
| Comment | // comment | // swap the values |
See these algorithms animated
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 AQA pseudocode?
AQA pseudocode is the code style used in AQA GCSE and A-level Computer Science exam papers. It assigns with the ← arrow, reads input with USERINPUT, writes with OUTPUT, and groups reusable code in SUBROUTINE…ENDSUBROUTINE blocks.
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.