OCR J277 · Component 02 · §2.5 · Paper 2

§2.5 Programming Languages and IDEs

Why are there different levels of programming language — and what tools does a programmer use to write, test, and run code?

Not all programming languages are the same level of abstraction. High-level languages (Python, Java, C#) look almost like English and are far away from the hardware — the programmer works in human-friendly concepts and leaves translation to the computer. Low-level languages (machine code, assembly) are close to the hardware — instructions map almost directly to what the CPU does, giving the programmer fine control at the cost of readability and portability. OCR's spec covers the contrast between these two levels and the translators that bridge them.

A compiler translates an entire high-level program into machine code before it runs; errors are reported all at once, and the compiled program runs independently. An interpreter translates and runs line by line; errors are reported as they are encountered, but the interpreter must be present to run the program. Note: OCR does not require knowledge of assemblers — that is an AQA requirement and should not appear in OCR exam answers. The IDE (Integrated Development Environment) is the programmer's workplace: an editor, error diagnostics, a run-time environment, and a built-in translator all in one.

A student is writing a Python program in Thonny IDE. (a) Name two tools the IDE provides that help the student find and fix errors. (b) Compare a compiler and an interpreter: give one advantage of each. (c) When porting code to a different computer, which language type is easier to transfer — high-level or low-level? Explain why.

Key comparisons

High-level: readable, portable, closer to human language; Python, Java — translated by compiler or interpreter
Low-level: fast, close to hardware, processor-specific; machine code (binary) or assembly (mnemonic)
Compiler: translates whole program at once → .exe; fast to run; errors found all at once
Interpreter: translates line by line at runtime; slow; errors found as encountered; no separate compiled file

What students must understand

Linking questions

Practice

Video Support

Craig'n'Dave — OCR J277
Characteristics and purpose of different languages
The purpose of translators
Compilers & interpreters
IDE