Double entry check in pseudocode
Double entry check: INPUT the value twice inside a REPEAT loop and stop only when both are equal. Output a message if they do not match, so typing mistakes are caught.
Understanding Double entry check in pseudocode in IGCSE Computer Science Paper 2
What it does: Two INPUT statements store the first and second entries in separate variables so they can be compared. REPEAT ... UNTIL keeps asking for both entries until Password1 equals Password2. The message must appear each time the entries differ, so it goes inside the loop. After the loop the values are already equal. Double entry is a verification method. It checks that the data was typed correctly, not that the data is sensible or secure. If the user makes the identical typing error twice, the two entries still match. Verification does not guarantee the data is right. Comparing a value with itself can never catch a typing mistake. Two separate entries are needed for a double entry check.
Common mistakes: A double entry check uses a REPEAT ... UNTIL loop so both values are entered at least once. Line 1 should be REPEAT, not WHILE, because the loop ends with UNTIL. READ is not a Cambridge pseudocode keyword. The first entry must be read with INPUT Password1.
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 60–70) 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
UNTIL Password1 = Password2Fill in the Blanks
Spot the Error
Student with a class code? Join your class →