Pseudocode ↔ Python

For Cambridge IGCSE and AS & A Level Computer Science (0478 and 9618), write pseudocode or Python, then run or trace either version.

How does each line of Cambridge pseudocode become Python?

Edit the pseudocode or choose an Example, then press Run (or Step for one statement at a time) and compare the highlighted line in each editor.

Cambridge pseudocode
Source
Ln 1, Col 1
Python
Synced
Ln 1, Col 1
Ready
Idle
Run or step a program to inspect its variables.
Pseudocode subset
This lab is an independent interpreter, not an official Cambridge product. Both editors are parsed into one bounded program model before execution or synchronization. The Cambridge view follows the guide’s upper-case keywords, mixed-case identifiers, three-space indentation and assignment arrow.
Executable pseudocode subsetPrimitive values including DATE, literal constants, fixed one- and two-dimensional arrays, complete same-shape array assignment, arithmetic and logic, string and numeric functions, IF and CASE selection, all three loop forms, procedures, functions, recursion, BYVAL and BYREF parameters, INPUT and OUTPUT.
Global and local scopeCambridge pseudocode has no GLOBAL or LOCAL declaration keyword. A declaration at program level is global; a declaration inside a procedure or function is local and may hide a global name. Python global is supported for rebinding a top-level name. Nested functions and nonlocal remain outside this subset.
Outside this executable subsetThe wider guide also documents user-defined records, enumerations, pointers, sets, file handling and classes. This lab reports those topics as unsupported. Imports, real file or network access, eval/exec and external modules are also blocked. Runtime, call depth, collection size and output are capped.
Natural Python choicesScalar declarations disappear; compact Cambridge metadata remains only where reverse synchronization needs a type or bound. Arrays become zero-based lists, complete array assignment uses copy_array to preserve Cambridge value-copy behaviour, inclusive FOR loops become range, constants become bindings, and INPUT/OUTPUT become converted input and print calls.
Ctrl/⌘ EnterRun the selected editor F8Execute one statement EscapeStop the current run TabIndent using the selected language convention