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 | |
|---|---|---|
| 1Age field: range check (0 to 120) | AA range check is validation, not verification. A new password should use double entry to verify it was typed correctly. | |
| 2New password: enter it twice and compare | BIF Password1 = Password2 THEN OUTPUT "Passwords match" ENDIF | |
| 3Using both gives better protection: validation stops impossible values and verification catches typing slips. | CValidation only shows the age is acceptable, not correct. Someone could still mistype 25 instead of 52, so verification may be needed too. | |
| 4A justification uses 'because': double entry is needed for a new password because a typing slip could lock the user out. | DValidation: it tests that the age entered is acceptable, but it cannot tell if the age is the right one. | |
| 5Use a range check to verify a new password was typed correctly. | EVerification: double entry checks that the password was typed correctly, because both entries must match. | |
| 6Age 25 passes the range check, so the age must be correct. | FIF Age >= 0 AND Age <= 120 THEN OUTPUT "Age accepted" ENDIF |
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 data is acceptable, like an age range check. Verification checks it was typed correctly, like double entry. A scenario may need one or both.INPUT Age
IF Age >= 0 AND Age <= 120 THENINPUT Password
INPUT Confirm
IF Password = Confirm THEN// An age range check is validationREPEAT
INPUT Confirm
UNTIL Password = Confirm// Both checks are used because
// range finds bad data, double entry typos