← IGCSE Computer Science Paper 1

Choosing a translator for a scenario

Pick an assembler for assembly code, an interpreter while testing a program, or a compiler for release to customers, then justify your choice using 'because'.

Understanding Choosing a translator for a scenario in IGCSE Computer Science Paper 1

What it does: A compiler produces an executable file that customers can run without the translator or the source code, so it suits a final release. A full-mark answer states the choice and explains why it suits the scenario, linking the translator to its feature. Assembly language is a low-level language. An assembler translates it into machine code. Compilers and interpreters translate high-level code. While a program is being developed, an interpreter lets you run and test quickly. It stops at the line with the error, which makes it easier to fix. A justified answer gives a reason linked to the scenario. 'Because it is the best' is too vague to earn marks.

Common mistakes: A compiler does not run code line by line. It translates the whole program into an executable (.exe) file, which is why it suits release. That is the reason to give. The line should be why ← 'makes an .exe file'. The text 'assembly' must be in quotes. Without quotes, assembly is read as a variable name that does not exist. It should be language ← 'assembly'.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 440–449) and word search (Modules 440–463).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A student writes a program in assembly language. Which translator is needed?
An assembler, because assembly language must be translated into machine codeA compiler, because assembly language is a high-level language
Matches
Assembly code -> use a compiler
↓
A compiler translates high-level code, not assembly language. Assembly code needs an assembler.
Applying
Meanings
Term
choose a translator
Meaning
Pick an assembler for assembly code, an interpreter while testing a program, or a compiler for release to customers, then justify your choice using 'because'.
Practice
IF language = "assembly" THEN
Testing
Gaps
translator ← ""
Check Answer
Spots
3 translator ← 'compiler'
4 why ← 'runs line by line'

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Pufferfish' badge — Error Handler, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A student writes a program in assembly language. Which translator is needed?
A. A compiler, because assembly language is a high-level language
B. An assembler, because assembly language must be translated into machine code ✓
Assembly language is a low-level language. An assembler translates it into machine code. Compilers and interpreters translate high-level code.
2. A team is still testing and fixing a Python program. Which translator suits this stage best?
A. An interpreter, because it runs the code line by line and stops at an error ✓
B. A compiler, because it must create an executable file before every small test
While a program is being developed, an interpreter lets you run and test quickly. It stops at the line with the error, which makes it easier to fix.
3. A company is ready to sell its finished game to customers. Which translator should be used?
A. A compiler, because it produces an executable file that runs without the source code ✓
B. An interpreter, because customers need the source code and a translator to run it
For release, a compiler creates a machine code executable. Customers can run it without the source code and it usually runs faster.
4. Which justification is the best answer for choosing an interpreter during development?
A. I chose an interpreter because it is the best translator.
B. I chose an interpreter because I can test each part of the program and see errors straight away. ✓
A justified answer gives a reason linked to the scenario. 'Because it is the best' is too vague to earn marks.
5. A programmer writes code using mnemonics such as LDA and ADD. What should they choose?
A. Assembler ✓
B. Interpreter
Mnemonics are used in assembly language. Only an assembler translates assembly language into machine code.

Match the Pairs

Assembly code -> assembler → Assembly language can only be translated by an assembler, so choose an assembler for it.
Testing a program -> interpreter → While a program is being developed and tested, choose an interpreter because it runs line by line and stops at an error.
Releasing software to customers: choose a compiler because it makes an executable file that does not need the source code. → Translator = compiler (release)
A justified answer names the translator and gives a reason after the word 'because'. → Interpreter, because it stops at the error line
Assembly code -> use a compiler → A compiler translates high-level code, not assembly language. Assembly code needs an assembler.
Selling the game to customers -> interpreter → An interpreter needs the source code each time and runs slowly. A compiler should be chosen for release because it gives an executable file.

Key Term

choose a translator
Pick an assembler for assembly code, an interpreter while testing a program, or a compiler for release to customers, then justify your choice using 'because'.

Fill in the Blanks

1. IF language = "assembly" THEN translator ← "assembler" ENDIF
Hint: Type the translator that is needed for assembly language code
2. IF stage = "testing" THEN translator ← "interpreter" ENDIF
Hint: Type the translator that suits a program still under development, running it line by line
3. IF stage = "release" THEN translator ← "compiler" ENDIF
Hint: Type the translator used to produce the final program for customers
4. stage ← "release" OUTPUT "Compiler because it is for release"
Hint: Type the word that links the choice to its justification
5. IF language = "assembly" THEN translator ← "assembler" ENDIF
Hint: Type the kind of code that has to be translated by an assembler

Spot the Error

Question 1
A stage ← 'release'
B IF stage = 'release' THEN
C translator ← 'compiler'
D why ← 'runs line by line'
E ENDIF
Line D — A compiler does not run code line by line. It translates the whole program into an executable (.exe) file, which is why it suits release. That is the reason to give. The line should be why ← 'makes an .exe file'.
Question 2
A language ← assembly
B IF language = 'assembly' THEN
C translator ← 'assembler'
D ENDIF
Line A — The text 'assembly' must be in quotes. Without quotes, assembly is read as a variable name that does not exist. It should be language ← 'assembly'.
Question 3
A stage ← 'testing'
B IF stage = 'testing' THEN
C translator ← 'compiler'
D ENDIF
Line C — While a program is being tested, an interpreter is the better choice because it runs the code line by line and stops at an error. The line should be translator ← 'interpreter'.
Question 4
A stage ← 'release'
B IF stage = 'release'
C translator ← 'compiler'
D ENDIF
Line B — An IF statement must end its condition with THEN. The line should be IF stage = 'release' THEN.
Question 5
A stage ← 'testing'
B IF stage = 'testing' THEN
C translator ← 'interpreter'
D why ← 'makes an .exe file'
E ENDIF
Line D — Making an .exe file is what a compiler does, not an interpreter. The reason for choosing an interpreter while testing is that it stops at errors. The line should be why ← 'it stops at errors'.

Student with a class code? Join your class →