← IGCSE Computer Science Paper 2

Extreme test data

The largest and smallest values a program should accept, such as 0 and 120 for a range of 0 to 120. They sit exactly on the limits and the expected outcome is accepted.

Understanding Extreme test data in IGCSE Computer Science Paper 2

What it does: Extreme data is the smallest and largest acceptable values, which for this range are exactly 0 and 120. The value 120 is on the upper limit and is valid, so the program should accept it. 60 is a normal value in the middle of the range. Only 0 and 120 are the extremes. The extremes are the lowest and highest acceptable values. 9 and 21 are just outside the limits, so they are rejected. 120 is the largest acceptable value, so it must be accepted. Rejecting it means the check is wrong, perhaps using < instead of <=.

Common mistakes: Extreme test data sits exactly on the limits of the range, so the program should accept it. The line should say 'Expected result: accepted'. Extreme data is the smallest and largest acceptable values. For a range of 0 to 120 these are 0 and 120, not 1 and 119. The line should be 'Extreme data: 0 and 120'.

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 71–82) and word search (Modules 71–92).

Take this worksheet further — free with Cloodit

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

Learning
Duo
A program accepts ages from 0 to 120. Which pair is the extreme test data?
-1 and 1210 and 120
Matches
Extreme data for 0 to 120: -1 and 121, expected outcome: accepted
↓
-1 and 121 are just outside the range, so they are not extreme data and should be rejected. Extreme data is 0 and 120.
Applying
Meanings
Term
Extreme test data
Meaning
The largest and smallest values a program should accept, such as 0 and 120 for a range of 0 to 120. They sit exactly on the limits and the expected outcome is accepted.
Practice
// Range check: Age must be 0 to 120
Testing
Gaps
Age ←
Check Answer
Spots
2Extreme test data: 0 and 120
3Expected result: rejected

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

The 'Silverback Gorilla' badge — Savannah Master, 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. A program accepts ages from 0 to 120. Which pair is the extreme test data?
A. 0 and 120 ✓
B. -1 and 121
Extreme data is the smallest and largest acceptable values, so 0 and 120. -1 and 121 are just outside the range.
2. What should a program do with extreme test data?
A. Accept it ✓
B. Reject it
Extreme values are still inside the allowed range, so the expected outcome is accepted.
3. For a range check of 1 to 50, which value is extreme test data?
A. 51
B. 50 ✓
50 is the largest acceptable value, so it is extreme data. 51 is outside the range and would be rejected.
4. Where does extreme test data sit in a range 0 to 120?
A. In the middle of the range
B. Exactly on the limits ✓
Extreme data uses the lowest and highest allowed values, right on the limits. A value in the middle is normal data.
5. True or false: 60 is extreme test data for a range of 0 to 120.
A. False ✓
B. True
60 is a normal value in the middle of the range. Only 0 and 120 are the extremes.

Match the Pairs

Range check 0 to 120: test 0 → Extreme test data on the smallest acceptable value. The program should accept it.
Range check 0 to 120: test 120 → Extreme test data on the largest acceptable value. The program should accept it.
Extreme test data for a range of 0 to 120 uses the two limits themselves → Extreme data: 0 and 120
Extreme test data sits exactly on the limits and the expected outcome is accepted → Test data 120, expected outcome: accepted
Extreme data for 0 to 120: -1 and 121, expected outcome: accepted → -1 and 121 are just outside the range, so they are not extreme data and should be rejected. Extreme data is 0 and 120.
Extreme data for 0 to 120: 0 and 120, expected outcome: rejected → Extreme data is valid, so the expected outcome should be accepted, not rejected.

Key Term

Extreme test data
The largest and smallest values a program should accept, such as 0 and 120 for a range of 0 to 120. They sit exactly on the limits and the expected outcome is accepted.

Fill in the Blanks

1. Age ← 120 IF Age >= 0 AND Age <= 120 THEN OUTPUT "Accepted"
Hint: Type the largest value the range allows, to use as extreme test data.
2. Age ← 0 IF Age >= 0 AND Age <= 120 THEN OUTPUT "Accepted"
Hint: Type the smallest value the range allows, to use as extreme test data.
3. Age ← 120 IF Age >= 0 AND Age <= 120 THEN OUTPUT "Accepted"
Hint: Type the relational operator that lets a value exactly on the upper limit be accepted.
4. Age ← 0 IF Age >= 0 AND Age <= 120 THEN OUTPUT "Accepted"
Hint: Type the logical operator that needs both limits to be satisfied.
5. Age ← 0 IF Age >= 0 AND Age <= 120 THEN OUTPUT "Accepted"
Hint: Type the relational operator that lets a value exactly on the lower limit be accepted.

Spot the Error

Question 1
A // Age range is 0 to 120
B Extreme test data: 0 and 120
C Expected result: rejected
Line C — Extreme test data sits exactly on the limits of the range, so the program should accept it. The line should say 'Expected result: accepted'.
Question 2
A // Age range is 0 to 120
B Extreme data: 1 and 119
C Expected result: accepted
Line B — Extreme data is the smallest and largest acceptable values. For a range of 0 to 120 these are 0 and 120, not 1 and 119. The line should be 'Extreme data: 0 and 120'.
Question 3
A Extreme data is outside limits
B Range check: 0 to 120
C Extreme values: 0 and 120
Line A — Extreme data is still acceptable data. It sits exactly on the limits of the range, not outside them. The line should say 'Extreme data is on the limits'.
Question 4
A Age ← 120
B IF Age >= 0 AND Age <= 120
C THEN
D OUTPUT "Rejected"
E ENDIF
Line D — 120 is the largest value in the range 0 to 120, so it is extreme data and must be accepted. The line should be OUTPUT "Accepted".
Question 5
A // Smallest extreme value
B Age ← 0
C IF Age > 0 AND Age <= 120
D THEN OUTPUT "Accepted"
E ENDIF
Line C — Using > would wrongly reject 0, which is the smallest acceptable value. The condition should use >= so the lower limit is accepted: IF Age >= 0 AND Age <= 120.

Student with a class code? Join your class →