AQA 8525 GCSE Computer Science · 3.2 Programming

Stretch tasks Classification of Programming Languages

Task 1

Quiz Challenge

A quiz game against four computer players, then short and long written answers.

  1. Quiz Blitz12 questions against the clock
  2. Quick Fire4 short answers
  3. Big Think2 long answers

About 20 minutes

Task 2

This or That

Pixel the cat asks 8 questions. Each has two answers: pick the right one.

  • Two answers to every question
  • A fish treat for every right answer
  • Streaks win Pixel shades, then a party hat

About 4 minutes

Task 3

Memory Match

Flip the cards two at a time to match each term card to its meaning card.

  • 12 cards: each term has a meaning
  • One peek at every card
  • Combo points for pairs found in a row

6 pairs, about 4 minutes

Task 4

Sort It

Sort each statement into the right box, like the tick-box tables in the exam.

  • 11 cards to sort into 2 boxes
  • Drag a card, tap a box or press its number
  • Combo points for cards sorted in a row

11 cards, about 4 minutes

The games need JavaScript. Every question is below, with the answers at the end.

Read the lesson: Classification of Programming Languages

Classification of Programming Languages: the questions

Quiz Challenge, round 1: Quiz Blitz

  1. Which of these is a low-level language?

    • C#
    • VB.NET
    • Assembly language
    • Python
  2. What does one high-level statement usually become?

    • Many machine instructions
    • One machine instruction
    • A single bit
    • One mnemonic
  3. Which translator works almost one to one?

    • Interpreter
    • Editor
    • Assembler
    • Compiler
  4. An interpreter produces an executable file.

    • True
    • False
  5. Which translator lets a program be sold without its source code?

    • Assembler
    • Debugger
    • Compiler
    • Interpreter
  6. Where are low-level languages still used?

    Tick 2.

    • Embedded systems with very little memory
    • Most websites
    • School spreadsheets
    • Word processors
    • Device drivers
  7. Which language is the binary that a processor executes?

    • Machine code
    • Assembly language
    • Python
    • Pseudo-code
  8. Which word means a program can run on different types of computer?

  9. Why does interpreted code run more slowly?

    • It has more comments
    • It is translated every time it runs, even inside loops
    • It uses more RAM chips
    • It is written in assembly
  10. Assembly language still has to be translated before it runs.

    • True
    • False
  11. Which of these is an assembly mnemonic?

    • WHILE
    • 01101001
    • LDA
    • print
  12. Order these from highest level to lowest level.

    Number these 1 to 3.

    • Assembly language
    • Machine code
    • Python

Quiz Challenge, round 2: Quick Fire

  1. State one advantage of an interpreter over a compiler, and why it helps. [2 marks]

  2. Explain why a compiled program only runs on one type of machine. [2 marks]

  3. Explain why a programmer might use assembly language to write a device driver. [2 marks]

  4. Explain what an assembler does. [2 marks]

Quiz Challenge, round 3: Big Think

  1. Compare high-level and low-level languages. [6 marks]

  2. A games company is choosing between a compiler and an interpreter. Explain which it should use while developing the game, and which when distributing it. [4 marks]

This or That: tick the right answer

  1. Which runs on any machine with the right translator?

    • Python source code
    • Machine code for one processor
  2. Compiling is slow. So what is fast?

    • Finding errors
    • The finished program
  3. Is assembly language the same as machine code?

    • Yes: both are binary
    • No: it uses mnemonics and must be assembled
  4. Who manages memory in a high-level language?

    • The language, for you
    • The programmer, by hand
  5. Which gives complete, direct control of the hardware?

    • High-level languages
    • Low-level languages
  6. Why do security analysts read machine code?

    • It is often all they have
    • It is easier than Python
  7. Which translator must the user have to run the program?

    • A compiler
    • An interpreter
  8. ADD, LDA and STA are...

    • Assembly mnemonics
    • Python keywords

Memory Match: match each term to its meaning

TermMeaning
A High-level language1 Binary the processor executes
B Machine code2 Mnemonics in place of binary opcodes
C Assembly language3 Close to human language
D Compiler4 Translates one statement at a time
E Interpreter5 Running on different types of computer
F Portability6 Whole program, translated once

Sort It: tick one box in each row

High-level or low-level language?

StatementHigh-levelLow-level
Can be optimised precisely for speed
Quick to write, as one statement does a lot
Python, C# and VB.NET
Complete, direct control of the hardware
Portable: runs on any machine with a translator
Close to English, so easy to follow
Used for device drivers
Memory is managed for you
Machine code and assembly language
Written for one processor family
The programmer manages memory
Answers

Round 1: Quiz Blitz

  1. Assembly language Low-level languages are machine code and assembly language.
  2. Many machine instructions That one fact explains why high-level code is quick to write and gives less direct control.
  3. Assembler Each assembly mnemonic becomes one machine instruction.
  4. False It executes as it translates, so no executable is made.
  5. Compiler Customers receive only the executable.
  6. Device drivers; Embedded systems with very little memory Wherever direct hardware control or tiny memory use is worth the effort.
  7. Machine code Everything else must be translated into machine code.
  8. portability High-level languages are portable. Low-level code is written for one processor family.
  9. It is translated every time it runs, even inside loops Every run, and every time round a loop, each line is translated again.
  10. True An assembler turns its mnemonics into machine code.
  11. LDA LDA, ADD and STA are short mnemonics for machine instructions.
  12. Python → Assembly language → Machine code High-level, then mnemonics, then pure binary.

Round 2: Quick Fire

    • Errors are reported line by line, as they are met
    • So faults are quicker to find and fix
    Model answer

    An interpreter reports each error as soon as the line is reached, which makes faults far quicker to find and fix during development.

    • The executable is machine code for one type of processor
    • A different type of machine needs its own compiled version
    Model answer

    The executable is machine code for one type of processor, so a different type of machine needs the program compiled again, as a separate version.

    • It gives direct control of the hardware and its registers
    • It can be optimised for speed and memory
    Model answer

    A device driver must talk directly to specific hardware registers, which assembly language allows, and the code can be optimised precisely for speed and memory.

    • It translates assembly language into machine code
    • Each mnemonic becomes one machine instruction
    Model answer

    An assembler translates assembly language into machine code. The relationship is close to one to one: each mnemonic becomes one machine instruction.

Round 3: Big Think

    • High-level: close to English, easy to read
    • High-level: portable
    • High-level: quick to develop in
    • One high-level statement becomes many machine instructions
    • Low-level: hard to read and slow to write
    • Low-level: written for one processor family
    • Low-level: complete control of the hardware
    • Low-level: can be optimised precisely
    Model answer

    High-level languages are close to English, so they are easy to read, and they are portable, running on any machine with a translator. They are quick to develop in, because one statement becomes many machine instructions, and memory is managed for you. Low-level languages are hard to read and slow to write, and they are written for one processor family. But they give complete, direct control of the hardware and can be optimised precisely for speed and memory, which is why they are used for device drivers and embedded systems.

    • While developing: errors reported line by line make debugging quicker
    • To distribute: compile to an executable
    • The executable runs quickly
    • Players need no translator, and the source code stays private
    Model answer

    While developing, an interpreter is better, because it reports errors line by line as they are met, which makes debugging quicker. To distribute the game, a compiler should be used to produce an executable: it runs quickly, the players need no translator, and the source code is not given away, which protects the company's work.

This or That

  1. Python source code High-level code is portable. Machine code only runs on its own processor family.
  2. The finished program The compiled executable runs with no translation at all.
  3. No: it uses mnemonics and must be assembled Assembly replaces binary opcodes with mnemonics, which an assembler translates.
  4. The language, for you In low-level languages, managing memory is the programmer's job.
  5. Low-level languages That control is why they are still used for drivers and embedded systems.
  6. It is often all they have Malware arrives as an executable, without its source code.
  7. An interpreter Interpreted programs are translated on the user's machine every time they run.
  8. Assembly mnemonics Short mnemonics stand in for binary opcodes.

Memory Match

  • A 3 High-level language: Close to human language
  • B 1 Machine code: Binary the processor executes
  • C 2 Assembly language: Mnemonics in place of binary opcodes
  • D 6 Compiler: Whole program, translated once
  • E 4 Interpreter: Translates one statement at a time
  • F 5 Portability: Running on different types of computer

Sort It

  1. Low-level Can be optimised precisely for speed The programmer decides every instruction.
  2. High-level Quick to write, as one statement does a lot One statement becomes many machine instructions.
  3. High-level Python, C# and VB.NET All three are high-level languages.
  4. Low-level Complete, direct control of the hardware That is why low-level languages are still used.
  5. High-level Portable: runs on any machine with a translator High-level code is not tied to one processor.
  6. High-level Close to English, so easy to follow High-level languages are written for people.
  7. Low-level Used for device drivers Drivers must talk directly to hardware registers.
  8. High-level Memory is managed for you The language handles memory.
  9. Low-level Machine code and assembly language These are the two low-level languages.
  10. Low-level Written for one processor family Low-level code uses one processor's instruction set.
  11. Low-level The programmer manages memory Nothing is handled for you.