Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1Line 1 translated -> Line 1 runs -> Line 2 translated -> Line 2 runs | ARun 1: translate lines 1-3 and run Run 2: translate lines 1-3 and run | |
| 2python game.py | Bgame.py + interpreter -> output (no game.exe created) | |
| 3An interpreter produces no executable file, so the source code is still needed on every run | CThe interpreter is needed on every run, because nothing is saved and the source code is translated again each time. | |
| 4Translation repeats on every run, because the interpreter translates each line again every time the program is run | DThis describes a compiler. An interpreter translates and runs one line at a time and makes no executable file. | |
| 5An interpreter translates the whole program first and then creates an executable file to run | EAn interpreter translates one line and executes it straight away, then moves on to the next line | |
| 6After the first run, the interpreter is no longer needed because the program has been translated | FThe interpreter is started and given the source code, so it translates and runs game.py every time |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
interpreter — A translator that translates a high-level program one line at a time and runs each line straight away. It makes no executable file, so the source code and interpreter are needed on every run.for line in program:
translate(line)
execute(line)for line in program:
translate(line)
execute(line)for line in program:
translate(line)
execute(line)exeFileCreated = FalserunProgram(sourceCode, interpreter)