paper2.5.2
1. Source (Accept "High-level")
2. Executable
3. One-by-one (Accept "Line-by-line")
No mark scheme available.
Translator: Compiler (1)
Reasons (Any two):
- Creates an executable file (user doesn't need Python) (1).
- Protects the source code (proprietary protection) (1).
- Optimizes the code for faster execution (1).
- The compiler converts code into machine code once before running (1).
- The interpreter must translate every line every time it runs, taking CPU time during execution (1).
Indicative Content:
- The Process: Interpreter runs one line at a time and pauses (1).
- Visibility: Programmer can inspect variable values in the Watch Window during the pause (1).
- Logic Errors: These don't crash code but give wrong results. Watching variables change line-by-line shows exactly where it goes wrong (1).
- Vs Compiler: A compiler produces a "black box" executable; you cannot easily pause to check internal memory states (1).