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

Variables, Constants, Data Types and Algorithms

What an algorithm is and its four characteristics, how variables, constants and data types are used, and the three control structures: sequence, selection and repetition.

Sections 7 and 87.47.5≈ 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 C2 · EXPLAINER

Variables, Constants, Data Types and Algorithms

A program remembers values in named boxes called variables. Understanding them and the three basic control structures is the foundation of every program.

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

Step 2 · Read

Key notes

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

Algorithm

Finite, ordered, unambiguous steps with input/output.

Variable / constant

Changes while running / fixed value.

Assignment

name ← expression stores a value.

Integer / real

Whole numbers / decimal numbers.

String / char / Boolean

Text / one symbol / True or False.

Sequence

In order.

Selection

IF…THEN…ELSE.

Repetition

Loops.

EXAM TIPS & COMMON MISTAKES

  • Phone numbers and IDs are strings.
  • Use meaningful variable names: avg, not x.
  • Constants are used for values like tax rate that never change in the program.
  • Name the three control structures when asked.
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 7.5

1. A named memory location whose value can change is a

Answer: B. Variable.
Syllabus 7.5

2. Which would be declared as a constant?

Answer: C. It stays fixed.
Syllabus 7.5

3. The best data type for the value 72.5 is

Answer: D. It has a decimal.
Syllabus 7.5

4. The best data type for a student’s name is

Answer: A. Text.
Syllabus 7.5

5. A Boolean can store

Answer: B. Two values.
Syllabus 7.5

6. Choosing between two paths with IF is

Answer: C. Selection.
Syllabus 7.5

7. A FOR loop is an example of

Answer: D. Iteration.
Syllabus 7.4

8. Which is NOT a characteristic of an algorithm?

Answer: A. It must be unambiguous.
Step 4 · Apply

Paper 2 practice — structured questions

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

Paper 2 style · Algorithms

Question 1 [10 marks]

A program reads a pupil’s three marks and prints the average.

(a) (a) Define the term algorithm. [2]

MARK SCHEME — (a) (max 2)

(b) (b) Name suitable data types for (i) the marks, (ii) the pupil’s name and (iii) a variable that records whether the pupil passed. [3]

MARK SCHEME — (b) (max 3)

(c) (c) State one difference between a variable and a constant. [2]

MARK SCHEME — (c) (max 2)

(d) (d) Name the three control structures. [3]

MARK SCHEME — (d) (max 3)

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.