OCR J277 GCSE Computer Science · 2.5 Programming Languages and IDEs
Stretch tasks Programming Languages and IDEs
Quiz Challenge
A quiz game against four computer players, then short and long written answers.
- Quiz Blitz12 questions against the clock
- Quick Fire4 short answers
- Big Think2 long answers
About 20 minutes
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
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
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
Which is a high-level language?
- Assembly language
- Binary
- Python
- Machine code
What does an assembler translate?
- Machine code into Python
- English into assembly language
- Assembly language into machine code
- Python into machine code
Which translator turns the whole program into machine code in one go?
- Debugger
- Compiler
- Interpreter
- Assembler
An interpreter stops at the first error it finds.
- True
- False
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
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
Which IDE feature pauses a program at a chosen line?
- A breakpoint
- Syntax highlighting
- Auto-complete
- Line numbers
What name is given to software with an editor, a translator, a run-time environment and debugging tools in one place?
Where is low-level language still used?
- Business spreadsheets
- School timetables
- Device drivers and tiny embedded systems
- Most websites
A high-level language runs directly on the processor.
- True
- False
Which IDE feature colours keywords, strings and comments?
- Syntax highlighting
- Breakpoints
- Error diagnostics
- Stepping
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
Give one advantage of using an interpreter while developing a program. [2 marks]
Compare high-level and low-level languages. [2 marks]
Describe two features of an IDE that help a programmer find errors. [2 marks]
Explain why a program written in a high-level language must be translated before it runs. [2 marks]
Quiz Challenge, round 3: Big Think
Compare compilers and interpreters. [6 marks]
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
Which is easier to debug?
- Python
- Machine code
Which uses mnemonics such as LDA and ADD?
- Python
- Assembly language
Which must be on every computer that runs the program?
- An interpreter
- A compiler
Compiled code is said to be faster. What exactly is faster?
- The compiling itself
- The finished program running
What does stepping do in an IDE?
- Deletes one line at a time
- Runs the program one line at a time
Why do line numbers matter in an editor?
- They make the program run faster
- Error messages refer to them
Which gives complete control over the hardware?
- A low-level language
- A high-level language
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
| Term | Meaning |
|---|---|
| A Compiler | 1 Editor, translator and debugger in one |
| B Interpreter | 2 Pauses the program at a chosen line |
| C Assembler | 3 Binary that the processor runs directly |
| D Machine code | 4 Translates the whole program at once |
| E Breakpoint | 5 Turns assembly language into machine code |
| F IDE | 6 Translates and runs one line at a time |
Sort It: tick one box in each row
Compiler, interpreter or both?
| Statement | Compiler | Interpreter | Both |
|---|---|---|---|
| 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
- Python High-level languages are close to human language and must be translated.
- Assembly language into machine code Roughly one assembly instruction becomes one machine code instruction.
- Compiler A compiler produces an executable file before the program runs.
- True That makes debugging easier, because errors are found one at a time.
- The executable runs quickly; Users do not need the source code Stopping at the first error is an interpreter's advantage.
- It is specific to one type of processor Each processor family has its own instruction set.
- A breakpoint While paused, the programmer can inspect the variables.
- ide An integrated development environment, such as IDLE or Thonny.
- Device drivers and tiny embedded systems Where absolute control or efficiency matters.
- False It must be translated into machine code first.
- Syntax highlighting Colour makes the structure visible, so typing errors stand out.
- 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 answerAn 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 answerHigh-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 answerError 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 answerThe 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 answerA 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 answerThe 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
- Python Python reads almost like English. Machine code is pure binary.
- Assembly language Assembly language uses short mnemonics, one per machine code instruction.
- An interpreter An interpreter translates every time the program runs. A compiler's executable runs on its own.
- The finished program running Compiling takes time, but the executable then runs with no translation at all.
- Runs the program one line at a time Stepping lets you watch the flow of the program, line by line.
- Error messages refer to them An error on line 42 is easy to find when the lines are numbered.
- A low-level language Low-level code works directly with the processor's instructions.
- 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
- Compiler Reports all the errors together at the end Errors come as one list after compiling.
- Both Is a type of translator Compilers, interpreters and assemblers are all translators.
- Both Can be built into an IDE An IDE includes whichever translator the language needs.
- Interpreter Stops at the first error That makes interpreters good for debugging.
- Compiler Users do not need the source code They only need the executable.
- Interpreter Needs the source code to run the program The interpreter reads the source every time.
- Interpreter Translates every time the program runs Nothing is saved, so it translates again next time.
- Compiler Translates the whole program in one go A compiler translates everything before it runs.
- Interpreter Translates one line at a time An interpreter translates and runs each line in turn.
- Both Turns high-level code into machine code Both are translators for high-level languages.
- Compiler Produces an executable file Compiling produces an executable.