← IGCSE Computer Science Paper 2

Suggesting test data for a range check

Pick one normal, abnormal, extreme and boundary value for the range and say accept or reject. For 0 to 100: 50 normal, -5 abnormal, 100 extreme, 101 boundary.

Understanding Suggesting test data for a range check in IGCSE Computer Science Paper 2

What it does: 100 is the top end of the range 0 to 100. It is the highest valid value, so it is extreme data and is accepted. 101 is the value just above the upper limit of 100. Testing it checks that the range check rejects the first invalid value. Abnormal data should always be rejected. -5 is below the range and "abc" is not a number at all. Give an example of each type and say accept or reject with a reason, for example: 101 is rejected because it is above the maximum of 100.

Common mistakes: -5 is below 0, so it is outside the range. Abnormal data must be rejected, so the line should say reject. 100 is the largest value allowed, so it is extreme data and it is valid. It should be accepted, not rejected.

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 score must be from 0 to 100. Which is a NORMAL test value?
101 - it is inside the range, so it is accepted50 - it is inside the range, so it is accepted
Matches
Test data for 0 to 100: 101 is extreme data and should be accepted
↓
101 is outside the range 0 to 100, so it should be rejected. It is boundary data, not extreme data, because it is just beyond the limit.
Applying
Meanings
Term
Range check test data
Meaning
Pick one normal, abnormal, extreme and boundary value for the range and say accept or reject. For 0 to 100: 50 normal, -5 abnormal, 100 extreme, 101 boundary.
Practice
// Range check: Score 0 to 100
Testing
Gaps
50 - normal -
Check Answer
Spots
250 is normal: accept
3-5 is abnormal: accept

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

The 'Firefly' badge — Night Coder, 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 score must be from 0 to 100. Which is a NORMAL test value?
A. 101 - it is inside the range, so it is accepted
B. 50 - it is inside the range, so it is accepted ✓
Normal data is valid data from the middle of the allowed range. 50 is inside 0 to 100 so it should be accepted. 101 is outside the range.
2. A score must be from 0 to 100. Which is a good ABNORMAL test value?
A. -5 or "abc" - the data is invalid, so it is rejected ✓
B. -5 or "abc" - the data is valid, so it is accepted
Abnormal data should always be rejected. -5 is below the range and "abc" is not a number at all.
3. For a score from 0 to 100, which pair are the EXTREME test values?
A. -1 and 101 - the largest and smallest allowed values, accepted
B. 0 and 100 - the largest and smallest allowed values, accepted ✓
Extreme data is the lowest and highest values that are still valid. 0 and 100 are inside the range so they are accepted.
4. For a score from 0 to 100, which pair are the BOUNDARY test values at the upper limit?
A. 100 accepted and 101 rejected ✓
B. 100 rejected and 101 accepted
Boundary data tests the edge of the range: the last valid value (100) is accepted and the first invalid value (101) is rejected.
5. For a score from 0 to 100, what should happen to the boundary test value -1?
A. It is rejected because it is just below the lowest allowed value 0 ✓
B. It is accepted because it is just below the lowest allowed value 0
-1 is the first invalid value below the range, so the range check must reject it. 0 is the value that is accepted.

Match the Pairs

50 → Normal test data for a score from 0 to 100. It is inside the range, so it is accepted.
-5 → Abnormal test data for a score from 0 to 100. It is outside the range, so it is rejected.
Extreme test data is the largest or smallest value that is still allowed, so it is accepted → 100
Boundary test data is the first value just outside the range, so it is rejected → 101
Test data for 0 to 100: 101 is extreme data and should be accepted → 101 is outside the range 0 to 100, so it should be rejected. It is boundary data, not extreme data, because it is just beyond the limit.
Test data for 0 to 100: "abc" is normal data and should be accepted → "abc" is not a number, so it is abnormal data and should be rejected. Normal data must be valid and inside the range.

Key Term

Range check test data
Pick one normal, abnormal, extreme and boundary value for the range and say accept or reject. For 0 to 100: 50 normal, -5 abnormal, 100 extreme, 101 boundary.

Fill in the Blanks

1. Range check: 0 to 100 50 - normal - ACCEPT
Hint: Type the decision for a normal value that sits inside the range.
2. Range check: 0 to 100 -5 - abnormal - REJECT
Hint: Type the test data type for a value that is outside the range and should be rejected.
3. Range check: 0 to 100 Lowest extreme value: 0
Hint: Type the smallest value that is still valid in this range.
4. Range check: 0 to 100 101 - boundary - REJECT
Hint: Type the decision for a value just beyond the top of the range.
5. IF Score >= 0 AND Score <= 100 THEN
Hint: Type the logical operator that needs both range conditions to be true.

Spot the Error

Question 1
A Range check: 0 to 100
B 50 is normal: accept
C -5 is abnormal: accept
Line C — -5 is below 0, so it is outside the range. Abnormal data must be rejected, so the line should say reject.
Question 2
A Range check: 0 to 100
B 100 is extreme: reject
C 0 is extreme: accept
Line B — 100 is the largest value allowed, so it is extreme data and it is valid. It should be accepted, not rejected.
Question 3
A Range check: 0 to 100
B 50 is normal: accept
C 100 is boundary: accept
D 101 is boundary: accept
Line D — 101 is just above the highest allowed value of 100. It is a boundary value that is invalid, so it must be rejected.
Question 4
A Range check: 1 to 100
B 0 is extreme: accept
C -1 is boundary: reject
Line A — The range starts at 0, not 1. The other lines accept 0 as extreme data, so the first line should be Range check: 0 to 100.
Question 5
A IF Score >= 0 OR Score <= 100
B THEN OUTPUT "Accept"
C ELSE OUTPUT "Reject"
D ENDIF
Line A — A range check needs AND, because the score must be at least 0 and at most 100. With OR every number passes, so abnormal data like -5 would be accepted.

Student with a class code? Join your class →