← IGCSE Computer Science Paper 2

Writing precise conditions (7a)

A precise condition uses a relational symbol and exact values, like Age >= 18. Words such as 'Age is old enough' or 'greater than' are too vague and lose marks.

Understanding Writing precise conditions (7a) in IGCSE Computer Science Paper 2

What it does: > means strictly greater than, so 16 fails and 17 passes. Using >= would wrongly let 16 through. The symbol >= includes the boundary value 100. This is the difference between x >= 5 and x > 5. A precise condition uses a variable, a relational symbol and an exact value. 'Old enough' is vague and loses marks. Cambridge expects symbols such as >, <, >=, <= and = in conditions, not the words 'greater than'. '30 or less' includes 30, so use <=. The < symbol would leave 30 out.

Common mistakes: The condition uses words ('is at least') instead of a relational symbol. It should be IF Mark >= 50 THEN. 'is between 1 and 10' is wording, not a precise condition. Use symbols and repeat the variable: UNTIL Num >= 1 AND Num <= 10.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 27–36) and word search (Modules 27–46).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which condition is written precisely enough for an exam answer?
Age >= 18Age is old enough
Matches
IF Mark is greater than 50 THEN
↓
The condition uses words instead of a relational symbol, so it is too vague and loses marks. It should be IF Mark > 50 THEN.
Applying
Meanings
Term
Age >= 18
Meaning
A precise condition uses a relational symbol and exact values, like Age >= 18. Words such as 'Age is old enough' or 'greater than' are too vague and lose marks.
Practice
IF Age >= 18 THEN
Testing
Gaps
IF Age 18 THEN
Check Answer
Spots
2Pass ← FALSE
3IF Mark is at least 50 THEN

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Hippopotamus' badge — Savannah Titan, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which condition is written precisely enough for an exam answer?
A. Age >= 18 ✓
B. Age is old enough
A precise condition uses a variable, a relational symbol and an exact value. 'Old enough' is vague and loses marks.
2. Which condition uses a relational symbol instead of words?
A. Score > HighScore ✓
B. Score is greater than HighScore
Cambridge expects symbols such as >, <, >=, <= and = in conditions, not the words 'greater than'.
3. Which condition names the exact variable being tested?
A. IF the mark is high enough THEN
B. IF Mark >= 50 THEN ✓
Name the variable (Mark) and give the exact value (50). Vague wording cannot be tested or coded.
4. A password must have at least 8 characters. Which condition is correct?
A. LENGTH(Password) >= 8 ✓
B. LENGTH(Password) > 8
'At least 8' includes 8, so >= is needed. Using > would wrongly reject a password with exactly 8 characters.
5. A user must be older than 12. Which condition is correct?
A. Age >= 12
B. Age > 12 ✓
'Older than 12' excludes 12, so use >. Age >= 12 would wrongly accept 12.

Match the Pairs

Score >= 50 → A precise condition: true when Score is 50 or more, so 50 itself passes
Age <> 18 → A precise condition: true when Age is anything other than 18
To test that a student must be older than 16 (16 itself does not count), write the symbol and the exact value → Age > 16
To test that a temperature is at least 100, include 100 itself by using the symbol for greater than or equal to → Temperature >= 100
IF Mark is greater than 50 THEN → The condition uses words instead of a relational symbol, so it is too vague and loses marks. It should be IF Mark > 50 THEN.
IF Age >= 18 THEN (when the rule says over 18) → The wrong symbol is used. 'Over 18' means 18 does not count, so it should be Age > 18, not Age >= 18.

Key Term

Age >= 18
A precise condition uses a relational symbol and exact values, like Age >= 18. Words such as 'Age is old enough' or 'greater than' are too vague and lose marks.

Fill in the Blanks

1. IF Age >= 18 THEN OUTPUT "Adult" ENDIF
Hint: Type the relational symbol that means 'greater than or equal to', not the words.
2. IF Mark > 40 THEN OUTPUT "Mark above 40" ENDIF
Hint: Type the exact variable name being compared with 40, as shown in the output message.
3. IF Quantity < 10 THEN OUTPUT "Low stock" ENDIF
Hint: Type the relational symbol meaning 'less than', which does not include 10 itself.
4. IF Age <= 5 THEN OUTPUT "Free entry" ENDIF
Hint: Type the symbol meaning 'less than or equal to', so a child aged exactly 5 is included.
5. IF Score >= 0 AND Score <= 100 THEN OUTPUT "Valid" ENDIF
Hint: Type the logical keyword that joins the two symbol-based conditions so both must be true.

Spot the Error

Question 1
A INPUT Mark
B Pass ← FALSE
C IF Mark is at least 50 THEN
D Pass ← TRUE
E ENDIF
Line C — The condition uses words ('is at least') instead of a relational symbol. It should be IF Mark >= 50 THEN.
Question 2
A REPEAT
B OUTPUT "Enter a number"
C INPUT Num
D UNTIL Num is between 1 and 10
Line D — 'is between 1 and 10' is wording, not a precise condition. Use symbols and repeat the variable: UNTIL Num >= 1 AND Num <= 10.
Question 3
A IF Temp greater than 30 THEN
B OUTPUT "Hot"
C ENDIF
Line A — 'greater than' is written in words. A precise condition uses the symbol: IF Temp > 30 THEN.
Question 4
A INPUT Items
B // Free delivery for 5 or more
C Free ← FALSE
D IF Items > 5 THEN
E Free ← TRUE
F ENDIF
Line D — '5 or more' includes 5, so the condition needs >=. Using > wrongly leaves out exactly 5 items. It should be IF Items >= 5 THEN.
Question 5
A INPUT Height
B IF the height >= 140 THEN
C OUTPUT "Can ride"
D ENDIF
Line B — The condition must name the exact variable, Height, as it was declared and input. 'the height' is not an identifier. It should be IF Height >= 140 THEN.

Student with a class code? Join your class →