← VCE Software Development U4O1

Validation versus verification

Validation checks entered data is reasonable and complete. Verification checks it matches the source data, for example by proofreading.

Understanding Validation versus verification in VCE Software Development U4O1

What it does: An existence check tests that data was entered at all, without comparing it to a source, so it is validation. Data can pass validation and still be wrong. For example, a mark of 70 instead of 80 is still reasonable. The code compares what was typed with the source data to confirm it was copied accurately, so it is verification. The message should say the mark is valid. To verify, the entered mark would have to be compared with the original source.

Common mistakes: A validation function is a normal function, so the def line must end with a colon: def is_valid_age(age):. Double entry verification compares the two entries. = assigns a value and is invalid in an if condition. Use == to compare.

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 125–171) and word search (Modules 115–171).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Which check confirms that an entered age is a number between 0 and 120?
ValidationVerification
Matches
if mark >= 0 and mark <= 100: print("Verified: matches the source")
↓
A range check is validation, not verification. It checks the mark is reasonable but does not compare it to the source data.
Applying
Meanings
Term
validation vs verification
Meaning
Validation checks entered data is reasonable and complete. Verification checks it matches the source data, for example by proofreading.
Practice
age = 16
Testing
Gaps
if 0 <= age 120:
Check Answer
Spots
1def is_valid_age(age)
2 return 0 <= age <= 120

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

The 'Rhinoceros' badge — Thick-Skinned 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. Which check confirms that an entered age is a number between 0 and 120?
A. Validation ✓
B. Verification
Validation checks that data is reasonable and complete. A range check on age is a validation check.
2. Which check confirms that the data typed in matches the original paper form?
A. Verification ✓
B. Validation
Verification compares entered data with the source data. Validation cannot tell if the entry matches the form.
3. A student enters 25 as their age, but their paper form says 15. Both values pass a range check. Which statement is true?
A. Verification passes but validation would catch the error
B. Validation passes but verification would catch the error ✓
25 is a reasonable age, so validation passes. Only comparing it with the source form (verification) finds the mistake.
4. Proofreading entered data against the source document is an example of:
A. Verification ✓
B. Validation
Proofreading is a manual way to verify data. A person compares what was entered with the source data.
5. A program rejects an empty email field with an existence check. This is:
A. Verification
B. Validation ✓
An existence check makes sure that required data has been entered. This is validation because it checks completeness, not accuracy against the source.

Match the Pairs

if age < 0 or age > 120: → Validation: a range check that tests whether the entered age is reasonable
if entered == source_copy: → Verification: checks that the entered data matches the original source data
Validation checks that data is reasonable and complete, for example that a required field is not empty → if name == "": print("Name is required")
Verification by double entry: the user types the data twice and the two entries must match → if email1 != email2: print("Entries do not match")
if mark >= 0 and mark <= 100: print("Verified: matches the source") → A range check is validation, not verification. It checks the mark is reasonable but does not compare it to the source data.
Proofreading confirms a value is within an allowed range. → Proofreading is verification: it compares the entered data with the source. It does not test whether a value is reasonable or in range.

Key Term

validation vs verification
Validation checks entered data is reasonable and complete. Verification checks it matches the source data, for example by proofreading.

Fill in the Blanks

1. if 0 <= age <= 120:
Hint: Type the comparison operator that keeps age at or below the upper limit of this validation range check.
2. email = input("Email: ") again = input("Re-enter email: ") if email == again:
Hint: Verification by double entry: type the operator that tests whether the two entries are equal.
3. if len(name) > 0:
Hint: Validation existence check: type the built-in function that returns how many characters a string has.
4. if age < 0 or age > 120: print("Invalid age")
Hint: Validation range check: type the logical operator that makes the test succeed when either limit is broken.
5. source = "Ava Nguyen" typed = input("Retype name: ") print(source == typed)
Hint: Verification compares entered data with the original. Type the variable that holds the source data.

Spot the Error

Question 1
A def is_valid_age(age)
B return 0 <= age <= 120
C print(is_valid_age(25))
Line A — A validation function is a normal function, so the def line must end with a colon: def is_valid_age(age):
Question 2
A pw1 = input('Password: ')
B pw2 = input('Re-enter: ')
C if pw1 = pw2:
D print('Verified')
Line C — Double entry verification compares the two entries. = assigns a value and is invalid in an if condition. Use == to compare.
Question 3
A mark = int(input('Mark: '))
B if mark >= 0 or mark <= 100:
C print('Valid')
D else:
E print('Invalid')
Line B — This range check must use and, because a mark has to be at least 0 and at most 100. With or, every number passes, so invalid data is never rejected.
Question 4
A name = input('Name: ')
B while name == '':
C name == input('Name: ')
D print('Hello', name)
Line C — This existence check must store the new input. == only compares, so name never changes and the loop never ends. It should be name = input('Name: ').
Question 5
A source = 'S1042'
B typed = inpt('ID: ')
C if typed == source:
D print('Matches source')
Line B — The function name is misspelled. It must be input(), otherwise Python raises a NameError and the typed data can't be verified against the source.

Student with a class code? Join your class →