Skip to content

2.5.1 Languages Practice Questions

GCSE · Paper 2 · Computational thinking, algorithms and programming · 10 practice questions · 35 marks

Exam questions for 2.5.1 Languages

10 practice questions (35 marks) with mark schemes

Answer each question, reveal the mark scheme, then award yourself marks. Scores and answers are saved in this browser so you can see which topics need more work.

Practice questions

  1. Question 1Practice question · J277/02 style2 marks

    State what is meant by a high-level language.

    Show mark scheme

    A programming language that uses English-like words / is easy for humans to read and write [1] which must be translated into machine code before the computer can run it / is not specific to one type of processor [1]

    Mark yourself: how many marks did you get?
    / 2
  2. Question 2Practice question · J277/02 style2 marks

    Give two characteristics of a low-level language.

    Show mark scheme

    Any two from: [2] Close to the instructions the processor runs / machine code Harder for humans to read and write Specific to one type of processor Gives the programmer detailed control of the hardware Can run very fast / use little memory

    Mark yourself: how many marks did you get?
    / 2
  3. Question 3Practice question · J277/02 style2 marks

    A processor can only run machine code. Explain why a programmer who writes in a high-level language needs a translator.

    Show mark scheme

    High-level code is not machine code / the processor cannot understand the high-level code [1] A translator converts it into machine code so the processor can run it [1]

    Mark yourself: how many marks did you get?
    / 2
  4. Question 4Practice question · J277/02 style4 marks

    Describe how a compiler and an interpreter each translate a program.

    Show mark scheme

    Compiler: translates the whole program at once / before it is run [1] and creates a separate machine code (executable) file [1] Interpreter: translates one line at a time [1] and runs each line straight away / does not create a separate file [1]

    Mark yourself: how many marks did you get?
    / 4
  5. Question 5Practice question · J277/02 style3 marks

    A company sells a finished word-processing program to customers. The company uses a compiler to translate the program. Give three benefits of using a compiler for this program.

    Show mark scheme

    Any three from: [3] The program runs fast because it is already in machine code The customer does not need the compiler to run it The source code is hidden, so customers cannot easily copy or change it The program only needs to be translated once and can then be run many times

    Mark yourself: how many marks did you get?
    / 3
  6. Question 6Practice question · J277/02 style4 marks

    Aliyah is learning to program. Her teacher says she should use an interpreter while she writes her programs. Explain why an interpreter is a good choice for Aliyah. Give one drawback of an interpreter.

    Show mark scheme

    She can run the program straight away without waiting for it all to be translated [1] The interpreter stops at the line with the error and reports it [1] so she can find and fix the mistake quickly, then run it again [1] Drawback: the program runs more slowly / the interpreter and source code are needed to run it / errors later in the program are found only when that line is reached [1]

    Mark yourself: how many marks did you get?
    / 4
  7. Question 7Practice question · J277/02 style4 marks

    A software company says that its program must be written in a high-level language and not in machine code. Give two reasons for this choice and one disadvantage of using a high-level language.

    Show mark scheme

    Any two reasons: [2] Easier for programmers to read, write and understand Quicker to write / test / fix The same program can be used on different computers (with the right translator) Has built-in features such as loops and functions Disadvantage (any one): [1] Must be translated, which takes time Often runs slower or uses more memory than machine code Less control of the hardware (Award 1 further mark for a correct, developed point, maximum 4 marks.) [1]

    Mark yourself: how many marks did you get?
    / 4
  8. Question 8Practice question · J277/02 style5 marks

    A company is making the software for the controller inside a washing machine. The controller has a very small amount of memory and its processor is the same in every machine. Explain why a low-level language might be chosen. Give one drawback of this choice.

    Show mark scheme

    Low-level code can use very little memory [1] which suits a controller with a small amount of memory [1] It can run fast / give direct control of the hardware [1] It only needs to work on one type of processor, so the fact that low-level code is specific to one processor is not a problem [1] Drawback: it is hard to read, write and fix / takes longer to write [1] Maximum 5 marks.

    Mark yourself: how many marks did you get?
    / 5
  9. Question 9Practice question · J277/02 style6 marks

    Compare compilers and interpreters. Use these headings in your answer: how the code is translated, speed of the finished program, and what is needed to run the program.

    Show mark scheme

    Any six from: [6] How the code is translated: Compiler translates the whole program at once [1] Interpreter translates one line at a time [1] Compiler produces a separate machine code file / interpreter does not [1] Speed: A compiled program runs faster because it is already machine code [1] An interpreted program runs slower because each line is translated every time it is run [1] What is needed: A compiled program can run without the compiler or the source code [1] An interpreted program needs the interpreter (and the source code) every time [1]

    Mark yourself: how many marks did you get?
    / 6
  10. Question 10Practice question · J277/02 style3 marks

    A game developer first tests a new game using an interpreter. When the game is finished, she uses a compiler to turn it into an executable. Explain why she uses a compiler for the finished game.

    Show mark scheme

    The finished game runs faster / smoothly because it is already machine code [1] Players can run it without the compiler or source code [1] Players cannot see or copy the source code [1] Maximum 3 marks.

    Mark yourself: how many marks did you get?
    / 3
General Exam Advice
  • •Practice answering questions under timed conditions
  • •Check your answers against the mark scheme carefully
  • •Focus on understanding the marking points, not just memorising answers
  • •Come back to the questions you dropped marks on a few days later