OCR J277 GCSE Computer Science · 2.5 Programming Languages and IDEs

Stretch tasks Programming Languages and IDEs

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 3 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: Programming Languages and IDEs

Programming Languages and IDEs: the questions

Quiz Challenge, round 1: Quiz Blitz

  1. Which is a high-level language?

    • Assembly language
    • Binary
    • Python
    • Machine code
  2. What does an assembler translate?

    • Machine code into Python
    • English into assembly language
    • Assembly language into machine code
    • Python into machine code
  3. Which translator turns the whole program into machine code in one go?

    • Debugger
    • Compiler
    • Interpreter
    • Assembler
  4. An interpreter stops at the first error it finds.

    • True
    • False
  5. Which TWO are advantages of a compiler?

    Tick 2.

    • The same file runs on any processor
    • Errors are reported one at a time
    • The executable runs quickly
    • Users do not need the source code
    • It stops at the first error
  6. Why is low-level code not portable?

    • It cannot be saved
    • It needs an internet connection
    • It is specific to one type of processor
    • It is too slow
  7. Which IDE feature pauses a program at a chosen line?

    • A breakpoint
    • Syntax highlighting
    • Auto-complete
    • Line numbers
  8. What name is given to software with an editor, a translator, a run-time environment and debugging tools in one place?

  9. Where is low-level language still used?

    • Business spreadsheets
    • School timetables
    • Device drivers and tiny embedded systems
    • Most websites
  10. A high-level language runs directly on the processor.

    • True
    • False
  11. Which IDE feature colours keywords, strings and comments?

    • Syntax highlighting
    • Breakpoints
    • Error diagnostics
    • Stepping
  12. Order these from closest to human language to closest to the hardware.

    Number these 1 to 3.

    • Assembly language
    • Machine code
    • Python

Quiz Challenge, round 2: Quick Fire

  1. Give one advantage of using an interpreter while developing a program. [2 marks]

  2. Compare high-level and low-level languages. [2 marks]

  3. Describe two features of an IDE that help a programmer find errors. [2 marks]

  4. Explain why a program written in a high-level language must be translated before it runs. [2 marks]

Quiz Challenge, round 3: Big Think

  1. Compare compilers and interpreters. [6 marks]

  2. A programmer is writing a game in Python using an IDE. Describe how the features of the IDE help them. [4 marks]

This or That: tick the right answer

  1. Which is easier to debug?

    • Python
    • Machine code
  2. Which uses mnemonics such as LDA and ADD?

    • Python
    • Assembly language
  3. Which must be on every computer that runs the program?

    • An interpreter
    • A compiler
  4. Compiled code is said to be faster. What exactly is faster?

    • The compiling itself
    • The finished program running
  5. What does stepping do in an IDE?

    • Deletes one line at a time
    • Runs the program one line at a time
  6. Why do line numbers matter in an editor?

    • They make the program run faster
    • Error messages refer to them
  7. Which gives complete control over the hardware?

    • A low-level language
    • A high-level language
  8. A company sells a game without sharing its code. Which translator suits that?

    • An interpreter
    • A compiler

Memory Match: match each term to its meaning

TermMeaning
A Compiler1 Editor, translator and debugger in one
B Interpreter2 Pauses the program at a chosen line
C Assembler3 Binary that the processor runs directly
D Machine code4 Translates the whole program at once
E Breakpoint5 Turns assembly language into machine code
F IDE6 Translates and runs one line at a time

Sort It: tick one box in each row

Compiler, interpreter or both?

StatementCompilerInterpreterBoth
Reports all the errors together at the end
Is a type of translator
Can be built into an IDE
Stops at the first error
Users do not need the source code
Needs the source code to run the program
Translates every time the program runs
Translates the whole program in one go
Translates one line at a time
Turns high-level code into machine code
Produces an executable file
Answers

Round 1: Quiz Blitz

  1. Python High-level languages are close to human language and must be translated.
  2. Assembly language into machine code Roughly one assembly instruction becomes one machine code instruction.
  3. Compiler A compiler produces an executable file before the program runs.
  4. True That makes debugging easier, because errors are found one at a time.
  5. The executable runs quickly; Users do not need the source code Stopping at the first error is an interpreter's advantage.
  6. It is specific to one type of processor Each processor family has its own instruction set.
  7. A breakpoint While paused, the programmer can inspect the variables.
  8. ide An integrated development environment, such as IDLE or Thonny.
  9. Device drivers and tiny embedded systems Where absolute control or efficiency matters.
  10. False It must be translated into machine code first.
  11. Syntax highlighting Colour makes the structure visible, so typing errors stand out.
  12. Python → Assembly language → Machine code Python is high-level, assembly uses mnemonics, and machine code is binary.

Round 2: Quick Fire

    • It stops at the first error and reports it
    • So errors are easier to find and fix
    Model answer

    An interpreter stops at the first error and reports it straight away, so errors are much easier to find and fix than a long list at the end of compiling.

    • High-level: close to human language, easy to write and portable
    • Low-level: specific to the processor, with direct control of the hardware
    Model answer

    High-level languages are close to human language, so they are easy to write and debug, and they are portable. Low-level languages are specific to one type of processor, but they give direct control of the hardware and can be very efficient.

    • Error diagnostics give the line number and type of error
    • Breakpoints and stepping pause the program and run it line by line
    • Syntax highlighting makes typing errors stand out
    Model answer

    Error diagnostics report the line number and the type of each error. Breakpoints pause the program at a chosen line so the variables can be inspected.

    • Processors only execute machine code
    • A compiler or interpreter converts the code
    Model answer

    The processor can only execute machine code, so a compiler or interpreter must convert the high-level code into machine code.

Round 3: Big Think

    • A compiler translates the whole program in one go
    • It produces an executable file
    • The executable runs quickly
    • Users do not need the source code
    • All errors are reported together at the end
    • An interpreter translates one line at a time, every time it runs
    • It stops at the first error
    • Interpreted programs run more slowly
    • Both the source code and the interpreter are needed to run it
    Model answer

    A compiler translates the whole program into machine code in one go, producing an executable file. The executable runs quickly, and users do not need the source code, which protects the developer's work, but all the errors are reported together at the end. An interpreter translates and runs the program one line at a time, every time it runs. It stops at the first error, which makes debugging easier, but the program runs more slowly, and both the source code and the interpreter are needed to run it.

    • Editor tools such as syntax highlighting, auto-complete and line numbers
    • Error diagnostics report the line and type of each error
    • A run-time environment runs and tests the game without leaving the IDE
    • The translator is built in
    • Debugging tools: breakpoints, stepping and a variable watch
    Model answer

    The editor has syntax highlighting, auto-complete and line numbers, so typing mistakes stand out. Error diagnostics report the line number and type of each error. The run-time environment lets the game be run and tested without leaving the IDE, because the interpreter is built in. Debugging tools such as breakpoints, stepping and a variable watch let the programmer pause the game and see values change.

This or That

  1. Python Python reads almost like English. Machine code is pure binary.
  2. Assembly language Assembly language uses short mnemonics, one per machine code instruction.
  3. An interpreter An interpreter translates every time the program runs. A compiler's executable runs on its own.
  4. The finished program running Compiling takes time, but the executable then runs with no translation at all.
  5. Runs the program one line at a time Stepping lets you watch the flow of the program, line by line.
  6. Error messages refer to them An error on line 42 is easy to find when the lines are numbered.
  7. A low-level language Low-level code works directly with the processor's instructions.
  8. A compiler Customers get only the executable, so the source code stays private.

Memory Match

  • A 4 Compiler: Translates the whole program at once
  • B 6 Interpreter: Translates and runs one line at a time
  • C 5 Assembler: Turns assembly language into machine code
  • D 3 Machine code: Binary that the processor runs directly
  • E 2 Breakpoint: Pauses the program at a chosen line
  • F 1 IDE: Editor, translator and debugger in one

Sort It

  1. Compiler Reports all the errors together at the end Errors come as one list after compiling.
  2. Both Is a type of translator Compilers, interpreters and assemblers are all translators.
  3. Both Can be built into an IDE An IDE includes whichever translator the language needs.
  4. Interpreter Stops at the first error That makes interpreters good for debugging.
  5. Compiler Users do not need the source code They only need the executable.
  6. Interpreter Needs the source code to run the program The interpreter reads the source every time.
  7. Interpreter Translates every time the program runs Nothing is saved, so it translates again next time.
  8. Compiler Translates the whole program in one go A compiler translates everything before it runs.
  9. Interpreter Translates one line at a time An interpreter translates and runs each line in turn.
  10. Both Turns high-level code into machine code Both are translators for high-level languages.
  11. Compiler Produces an executable file Compiling produces an executable.