Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1if age < 0 or age > 120: | Aif name == "": print("Name is required") | |
| 2if entered == source_copy: | BProofreading is verification: it compares the entered data with the source. It does not test whether a value is reasonable or in range. | |
| 3Validation checks that data is reasonable and complete, for example that a required field is not empty | Cif email1 != email2: print("Entries do not match") | |
| 4Verification by double entry: the user types the data twice and the two entries must match | DValidation: a range check that tests whether the entered age is reasonable | |
| 5if mark >= 0 and mark <= 100: print("Verified: matches the source") | EVerification: checks that the entered data matches the original source data | |
| 6Proofreading confirms a value is within an allowed range. | FA range check is validation, not verification. It checks the mark is reasonable but does not compare it to the source data. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
validation vs verification — Validation checks entered data is reasonable and complete. Verification checks it matches the source data, for example by proofreading.if 0 <= age <= 120:email = input("Email: ")
again = input("Re-enter email: ")
if email == again:if len(name) > 0:if age < 0 or age > 120:
print("Invalid age")source = "Ava Nguyen"
typed = input("Retype name: ")
print(source == typed)