Index

Frequently asked questions

Free Cambridge IGCSE (0478/0984), O Level (2210) and AS & A Level (9618) pseudocode compiler. Open the editor, syntax guide, or practice questions.

About this compiler

Is there a free IGCSE pseudocode compiler?

Yes. This site is a free online Cambridge IGCSE, O Level and AS & A Level pseudocode compiler. You can write, run and debug pseudocode in the browser with no install and no paywall on the editor.

It also includes a syntax guide, runnable examples, past-paper style practice questions, and a timed exam simulator.

Which Cambridge syllabuses does it support?

One grammar covers both IGCSE/O Level and A Level. There is no mode switch — IGCSE and 9618 syntax are always available.

Syllabus codes: Cambridge IGCSE Computer Science 0478 and 0984, Cambridge O Level Computer Science 2210, and Cambridge International AS & A Level Computer Science 9618.

Is this an official Cambridge International product?

No. It is an independent learning tool. Practice questions are written in the style of Cambridge papers and may reference paper years, but this site is not affiliated with, endorsed by, or a substitute for Cambridge Assessment International Education.

Do I need to install anything or create an account?

No install. The compiler, debugger, trace table, flowchart and Python view all run in a modern browser.

You can use the editor anonymously. Sign in with Google if you want saved practice progress, analytics, and the ability to create or sit a shared exam. There is no email/password signup.

Is it really free?

Yes. The compiler and current practice/exam features are free. A “Premium coming soon” badge may appear in the UI, but nothing is gated behind payment today.

How the website works

How does running code work?

Run happens entirely in your browser. An ANTLR4 parser reads Cambridge pseudocode and a tree-walking interpreter executes it. There is no server round-trip and no transpilation to Python for Run.

That is why INPUT can pause and wait for you, why you can stop a loop, and why the debugger can step line by line with live variables.

Practice and exam grading are different: those send your code to the server, run the same interpreter there with queued test inputs, and compare printed output to expected output.

How does INPUT work?

INPUT Name pauses execution and shows a field. INPUT Name, "Enter your name:" does the same with a prompt above the field.

You can input into array elements and record fields, for example INPUT Scores[i] or INPUT Pupil.Name.

If the variable was declared as INTEGER, REAL, BOOLEAN or DATE, the value is type-checked. If it was never declared, the first input infers the type.

Where do OPENFILE / READFILE / WRITEFILE files live?

File handling is simulated. In the editor, files are stored in the browser (localStorage), not on your computer’s disk. Random-access records (SEEK, GETRECORD, PUTRECORD) use the same sandbox.

During autograding, the server uses an equivalent in-memory filesystem so test cases can preload files without touching a real disk.

How are practice questions graded?

Each question has test cases: a list of INPUT values and the OUTPUT the program should print. The autograder runs your program once per test and compares normalised output (whitespace is collapsed).

It is exact-match grading, not an AI mark scheme. Extra OUTPUT lines, different wording, or a different print order will fail even if the algorithm is right. Match the question’s required output.

What are the trace table, flowchart and Python views?

Trace table: a dry-run log of variable values as the program runs — the same skill Cambridge asks for on paper.

Flowchart: an automatic diagram of the program’s control flow.

Python view: a translation of the current pseudocode into Python so you can see the equivalent. Some A Level features (random-access files, a few OOP edges) may appear as comments rather than runnable Python.

How do I share a program?

From the editor, copy a link. The program is encoded in the URL (?code=), so anyone opening it gets the same source. No account is required.

Teachers sharing a timed paper should use a published exam share code (/e/XXXXXX) instead of a code link. That starts a real exam attempt.

Why did a practice test fail when my logic looks right?

The grader compares printed text. Common mismatches: extra labels (OUTPUT "Answer: ", x vs OUTPUT x), trailing spaces, printing inside a loop when the question wanted a total afterwards, or using = vs <- in output you typed by hand.

Read the question’s sample I/O. Hidden tests use the same rules. Hints and the model solution (after you solve it, or as allowed by the question) show the expected shape.

Is my code saved if I close the tab?

The homepage editor autosaves to this browser’s local storage. It will not follow you to another device or another browser.

Practice questions remember lastCode on your account once you are signed in. Sign in before a long session if you care about progress.

Language and interpreter

Is DECLARE optional?

In this compiler, yes for simple variables. The first assignment or INPUT creates the name, and the type is inferred from that value. Count <- 0 and INPUT Name both work without a DECLARE line.

Undeclared arrays are also created if you index them (Scores[1] <- 10 allocates a 1-indexed array with a large upper bound). Prefer an explicit DECLARE Scores : ARRAY[1:n] OF INTEGER so bounds match the question.

Cambridge papers still expect DECLARE. Use it in practice and in exams. Optional declaration is a convenience of this interpreter, not a mark-scheme feature.

Are THEN and DO required?

THEN after IF / ELSEIF is optional. DO after WHILE is optional. IF x > 0 on one line and a body below still parses.

Write them anyway in assessed work. Mark schemes show IF … THEN and WHILE … DO.

Are keywords and names case-sensitive?

Keywords are case-insensitive: IF, if and If are the same. So are OUTPUT, DECLARE, PROCEDURE, CLASS, and the rest.

Variable names are case-sensitive: Total and total are different.

Record and class member names are case-insensitive, because Cambridge materials mix FirstName / Firstname.

Can I use = instead of <- ?

Assignment accepts both <- (the Cambridge form) and =. Comparison also uses = / <> / < / > / <= / >=.

Prefer <- for assignment so it is obvious which = is a test. :=, var, let and print are not IGCSE syntax; the error messages point you back to DECLARE / OUTPUT.

Are arrays 1-indexed?

Yes, unless you DECLARE different bounds. DECLARE Names : ARRAY[1:30] OF STRING is the usual IGCSE form. 2D arrays use ARRAY[1:rows, 1:cols].

This compiler does not support arrays of arrays (an array whose element type is another array). Use a 2D array instead.

What A Level (9618) features are included?

User-defined types (TYPE records, enums, pointers ^x / ptr^, SET OF + DEFINE), DATE with dd/mm/yyyy literals, CASE ranges (1 TO 5 :) and multi-value labels, BYREF / BYVAL (sticky across following parameters), random-access files, and OOP (CLASS / ENDCLASS, INHERITS, PUBLIC / PRIVATE, NEW, SUPER).

See the syntax guide for worked examples. IGCSE students can ignore the A Level section; the extra keywords will not get in the way of 0478 programs.

Why does DECLARE Date : STRING still work?

Most A Level words are soft keywords. In a variable-name position the parser treats TYPE, SET, DATE, RANDOM, NEW, CLASS, SEEK, DEFINE, INHERITS, PUBLIC, PRIVATE, BYREF, BYVAL, GETRECORD and PUTRECORD as ordinary identifiers.

SUPER, ENDTYPE, ENDCLASS and the older IGCSE keywords stay reserved. Type and class names themselves are still hard identifiers.

Can I write Python, Java or Portugol instead?

No. This is Cambridge pseudocode. print(), console.log, var / let, and Brazilian Portugol words (escreval, leia, fimse) produce student-friendly errors that name the IGCSE equivalent.

If you need Python, use the Python view after writing pseudocode — do not paste Python into the editor.

Can an IF or loop body be empty?

Yes. Comment-only or empty IF / loop bodies parse and run as no-ops. That matches starter scaffolds that leave // … for you to fill in. A literal ... placeholder in starter code is flagged with a “replace the placeholder” hint.

Does each statement need its own line?

Newlines are significant. Put one statement per line. Putting ENDIF or OUTPUT on the same line as the previous statement is a common parse error; the message will say the keyword must be on its own line.

Teachers and schools

Can I use this with a class?

Yes. Students can use the compiler without accounts. For tracked practice, ask them to sign in with Google.

Any signed-in teacher (or student) can build a fixed-question exam from the bank, publish it, and share a code or /e/… link. Students start a timed attempt; you currently see attempt counts on the exam page.

There is no LMS roster, due dates, or gradebook export yet. For a one-off mock, the share code is enough.

How do shared exams work?

Create an exam from /exams, pick questions from the bank, publish, and copy the share code. Students open /e/CODE (they must be signed in), sit the paper against the clock, and get a report card on submit.

The live exam session URLs are not indexed by search engines. This FAQ and the practice bank are the public pages.

What student data do you collect?

Google sign-in provides name, email and avatar. If the student uses practice or exams while signed in, we store attempts, scores, last code on a question, and progress analytics.

Anonymous editor use stays in the browser. We do not sell personal data. See the privacy policy for retention and rights.

Can students see solutions or game the autograder?

Model solutions are gated until a question is solved (or as the question allows). Hidden tests exist, but the grader still only checks printed output, so a program that hard-codes answers can pass if those answers match.

Treat autograded practice as rehearsal, not a high-stakes sit. For mocks, use a timed shared exam and remind students that Cambridge papers are handwritten.