CSEC INFORMATION TECHNOLOGY · PROBLEM-SOLVING AND PROGRAMMING · LESSON C5

Programming Languages, Implementation, Errors and Testing

Low-level and high-level languages, translators (compiler, interpreter, assembler), the steps in implementing a program, and the three kinds of error with the test data used to find them.

Sections 7 and 88.18.28.3≈ 50 min🎮 3 games
Before you start

By the end of this lesson you can…

Step 1 · Watch

Explainer video

5 narrated scenes. Press play, listen and read along — the points appear as they are explained. Use ‹ Prev / Next › or the scene bar to jump to any scene.

LESSON C5 · EXPLAINER

Programming Languages, Implementation, Errors and Testing

A computer only understands machine code, so a translator converts the language you write. When the program fails, you need to know whether the fault is in the spelling, the logic, or the data.

Narration uses your device’s built-in voice. No sound? Switch to “Captions only” — the captions advance on their own.

Explore in 3D

Compiler and interpreter in 3D

See how each translator deals with an error in the program.

Step 2 · Read

Key notes

Copy these into your notebook in your own words — that is how they stick.

Machine code / assembly

Low-level languages.

High-level language

English-like, portable, e.g. Python.

Compiler

Translates whole program at once.

Interpreter

Translates and runs line by line.

Assembler

Assembly → machine code.

Syntax / logic / runtime

Rule break / wrong result / crash while running.

Test data

Normal, boundary, erroneous.

Debug

Find and fix errors.

EXAM TIPS & COMMON MISTAKES

  • Compiler = whole program; interpreter = line by line.
  • Always include boundary test data.
  • Logic errors do not stop the program: check the output.
  • Give a specific example when asked for an error type.
Play & practise

Games

3 quick games on this lesson. Earn XP and badges as you play — your best score for each game is saved. Games are for practice and do not change your exam readiness. More games in the Information Technology Arcade.

Step 3 · Practise

Paper 1 practice — multiple choice

8 items modelled on real CSEC Paper 1 questions. Choose one answer for each, then check. Aim for 80% or better. Work each item on paper first.

Syllabus 8.1

1. Which is a high-level language?

Answer: D. Python.
Syllabus 8.1

2. A translator that converts the entire program before it runs is a

Answer: A. Compiler.
Syllabus 8.1

3. A translator that executes one line at a time is a

Answer: B. Interpreter.
Syllabus 8.3

4. A misspelled keyword is a

Answer: C. Rule broken.
Syllabus 8.3

5. A program that runs but calculates the wrong answer has a

Answer: D. Logic.
Syllabus 8.3

6. Dividing by zero while running causes a

Answer: A. Runtime.
Syllabus 8.3

7. For the rule “age must be 18 or over”, which is boundary data?

Answer: B. It is on the limit.
Syllabus 8.2

8. Which one is NOT a step in program implementation?

Answer: C. Unrelated.
Step 4 · Apply

Paper 2 practice — structured questions

Write full answers, then reveal the mark scheme and tick the points you earned (12 marks in total). Show all your working — method marks count. Your answers are saved on this device.

Paper 2 style · Programming concepts

Question 1 [12 marks]

Shani is writing a program in a high-level language to calculate the area of a circle.

(a) (a) State two advantages of a high-level language over machine code. [2]

MARK SCHEME — (a) (max 2)

(b) (b) Distinguish between a compiler and an interpreter. [2]

MARK SCHEME — (b) (max 2)

(c) (c) Name and explain the three types of error that Shani may find. [6]

MARK SCHEME — (c) (max 6)

(d) (d) Give an example of (i) normal data and (ii) erroneous data for a radius. [2]

MARK SCHEME — (d) (max 2)

Your progress

Lesson readiness

0%
READY
Not started
Video watched (20%)0%
Multiple choice (40%)0%
Structured (40%)0%

Sources

Where this topic appears in CSEC papers

Find these in your own past-paper booklets for extra timed practice. Items above are written in the style of these papers; any adapted from a specific question say so.