Menu

Edexcel GCSE Computer Science (1CP2) Exam Questions

Build a practice paper from 514 exam-style questions, each with its mark scheme and example answers. Print it, or answer it on paper and then open the mark schemes. Or browse the questions by topic.

Build a paper

Topics (none ticked: all of them)
Question types (none ticked: all of them)

Practice paper

2 questions · 4 marks

Pick again
Print
1Describe2 marksTranslators Swap Remove

A compiler and an interpreter both translate source code.

Describe one difference between what a compiler produces and what an interpreter produces.

[2 marks]
Mark scheme

Award up to two marks for a linked description such as:

  • A compiler produces object code/machine code/an executable (file) (1) whereas an interpreter produces no object code/translated file (1)
  • A compiler produces a machine code file (1) that can be run on its own/without the compiler/translator being present (1)
  • An interpreter produces no object code/file (1) because it translates and executes each line instead of saving translated code (1)
  • The compiler's output can be saved/stored (1) and run again later, while interpreted code has to be translated again each time it is run (1)

Allow binary for machine code.

Allow executable/an executable for object code.

Do not accept responses about translating the whole program, reporting errors or the speed of execution.

Do not accept 'the interpreter translates/executes one line at a time' on its own: this is how it translates, not what it produces. It earns the development only when linked to no object code/translated file being produced.

Do not accept the interpreter producing object code/an executable.

Example answers and how they were marked
Full marks2/2

A compiler produces object code, which is saved as a file, whereas an interpreter does not produce a file because it translates and executes each line.

Why: Compiler produces object code (1) contrasted with the interpreter producing no object code/translated file (1).

Some marks1/2

The compiler produces machine code.

Why: Machine code/object code produced (1); there is no contrast with the interpreter, so the development is not earned.

No marks0/2

The interpreter produces object code for each line it translates.

Why: Reverses the translators' outputs: the interpreter produces no object code, so nothing is creditworthy.

2Explain2 marksTranslators Swap Remove

An interpreter translates and executes high-level code.

Explain why an interpreted program must be translated again each time it is run.

[2 marks]
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
Full marks2/2

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).

Some marks1/2

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.

No marks0/2

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.

Questions by topic

More ways to revise Edexcel GCSE Computer Science (1CP2)

Teachers: build a paper, print it with the mark schemes at the end, and sign your school up to set your classes activities on every topic.

Fetch Decode Explain isn't affiliated with or endorsed by Pearson Edexcel.