Paper 2 · J277/02 · unit 2.5

Languages and IDEs

High-level vs low-level, compiler vs interpreter, IDE facilities. Short lesson, open quiz, no gates.

Everything on this course is open. Skip, jump, retry. Nothing is locked and there is no required order.

Why we do not write games in raw binary, and what the editor is doing besides showing a blinking cursor.

2.5.1 Languages

High-level vs low-level

High-level Low-level
Examples Python, Java, C#, OCR ERL Assembly, machine code
Close to Human language / maths The CPU’s actual instructions
Portability One program can run on many CPUs after translation Often specific to a processor family
Speed / control Easier to write; translator decides details Fine control, can be faster / smaller
Ease Faster to learn and debug Painful for large programs

Machine code is binary the CPU executes. Assembly is a text mnemonic for those instructions (LDA, ADD) — still low-level.

Translators

High-level source has to become machine code (or be carried out by one).

Compiler Interpreter
How Translates the whole program into an executable, then you run it Translates and runs line by line (or statement by statement)
After translation You can run the executable without the compiler You need the interpreter every time
Errors Often reported in a batch after compile Stops at the first runtime/syntax problem it hits
Speed of the finished program Usually faster (already machine code) Usually slower (translating as it goes)
Speed of trying ideas Compile step costs time Instant run — good for learning

Python is typically interpreted (CPython). C is typically compiled. Some languages use both (compile to bytecode, then interpret/JIT). If the question is two-column compare, stay with the table above.

Assembler translates assembly → machine code. (A third translator type; mention it if they ask for all.)

2.5.2 The IDE

An Integrated Development Environment is the app you write in (VS Code, PyCharm, IDLE, Thonny…). OCR wants facilities:

Facility Why it helps
Editor Typing code, often with colour (syntax highlighting) and auto-indent
Error diagnostics Underlines / messages for syntax problems before or as you run
Run-time environment Actually runs the program, shows output, lets you type input
Translator Compiler or interpreter built in or one click away
Debugger (worth knowing) Breakpoints, step line-by-line, watch variables — cousin of a trace table

An IDE is not required to write code (Notepad + python file.py works) but it reduces friction and catches mistakes earlier.


If you already live in an editor, use the quiz as a vocabulary check. If not, open Thonny or VS Code and find each facility once — that is the exercise.

Practice · optional · answers on this page

Exercises

Do as many or as few as you like, in any order. Hints and a model answer sit under each task.

2.5.1 · e1 paper

High or low?

1. Python 2. Machine code 3. Assembly 4. OCR Exam Reference Language For each: high or low, and one reason.
Hint
Close to English vs close to the CPU.
Show a model answer
1. High — readable, portable, needs a translator 2. Low — binary for a CPU 3. Low — mnemonics for CPU instructions 4. High — designed for humans / exams, not a chip
2.5.1 · e2 paper

Compiler vs interpreter — four bullets

Two differences that favour a compiler for a shipped game, two that favour an interpreter while you are learning.
Hint
Speed of finished program vs speed of trying a change; distributing an exe vs needing the interpreter.
Show a model answer
Compiler / game: whole program already machine code so it runs faster; players do not need the compiler or source. Interpreter / learning: run immediately without a compile step; stops at the line with the error so you see it in context.
2.5.2 · e3 think

Hunt the IDE

Open whatever you write Python in. Find and name: 1. The editor pane 2. Where error messages appear 3. The run button / command 4. (Bonus) a debugger step-over or breakpoint
Hint
If you only have notepad, that is an editor without the rest — say so.
Show a model answer
Example (Thonny): editor is the top pane; errors in the shell/red underline; Run (F5); debugger is the bug icon / step buttons. Example (VS Code): editor tab; Problems panel; play/run Python file; breakpoints in the gutter.

Check yourself · not a gateway

Quiz

Mark it, reveal it, or skip it. A low score does not close anything. Try again as often as you want.

1 2.5.1 Machine code is…
2 2.5.1 An interpreter…
3 2.5.1 Advantages of high-level languages include… (Select all that apply)
4 2.5.2 Syntax highlighting is a feature of the IDE’s…
5 2.5.2 A run-time environment in an IDE is there to…
6 2.5.1 Once a program is compiled, you typically still need the compiler on the user’s PC to run it.