An interpreter translates and executes high-level code.
Explain why an interpreted program must be translated again each time it is run.
Mark scheme
Award up to two marks for a linked explanation such as:
- No object code/machine code file is stored/saved (1) so there is no translated program to run on the next occasion (1)
- The translation is only temporary/is lost when the program ends (1) because each line is translated as the program runs (1)
- No executable file is created/saved (1) so the whole program has to be translated again every time it is run (1)
- The interpreter translates each line while the program is running (1) so nothing is kept that could be run without the interpreter (1)
For both marks, the expansion must follow/associate with the statement.
Do not accept 'it is interpreted' or 'it is not compiled' without saying that no object code/executable is stored/saved.
Do not accept 'the source code is high-level so it must be translated' or 'the source code has to be turned into machine code' on its own, as this is true of any translation.
Do not accept answers about the source code being deleted.
Example answers and how they were marked
The interpreter does not store an object code file, so there is no machine code file to run on the next occasion.
Why: No object code stored (1) linked to no translated program for the next run (1).
No object code is saved.
Why: Point that nothing is stored (1) but no linked reason saying why this means the program must be translated again.
It has to be translated again because the interpreter deletes the source code after each run.
Why: Incorrect: the interpreter does not delete the source code; no mark scheme point.