Presence check
A validation check that tests something has been entered, so the input is not empty. For example, Name <> "" or LENGTH(Name) > 0 makes sure a required field is not left blank.
Understanding Presence check in IGCSE Computer Science Paper 2
What it does: The loop keeps asking while the required Name field is empty, so the user must enter something before the program continues. The condition is true only when at least one character has been entered, which is how a presence check accepts input. Required fields on a form use a presence check. A range check tests that a number lies between a lowest and highest value. A string with a length greater than 0 is not empty, so this tests that something has been entered.
Common mistakes: The presence check is the wrong way round. Name = "" is true when nothing was entered, so 'Accepted' would show for an empty name. It should be IF Name <> "" THEN. The loop must repeat while the name is empty, so the user is asked again. Name <> "" repeats when a name has been entered. It should be WHILE Name = "" DO.
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 47–57) and word search (Modules 47–70).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
Presence checkFill in the Blanks
Spot the Error
Student with a class code? Join your class →