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: -5 (allowed range 0 to 120) | ATest input: -20 | Expected result: rejected with an error message | |
| 2Age: "abc" (a whole number is needed) | BTest input: (nothing typed) | Expected result: rejected | |
| 3An empty input is abnormal test data, and the expected outcome is that it is rejected | C50 is inside the allowed range, so it is normal data and would be accepted. Abnormal data would be a value like -5 or 150. | |
| 4Abnormal test data is chosen so that the program should reject it, not accept it | DAbnormal data should be rejected. Letters are the wrong type for an age, so the expected result should be rejected, not accepted. | |
| 5Age range 0 to 120. Abnormal test data: 50. Expected result: rejected | EAbnormal test data: a negative age is outside the allowed values, so the program should reject it | |
| 6Abnormal test data: "abc" for an age. Expected result: accepted | FAbnormal test data: letters are the wrong data type for a number, so the program should reject them |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Abnormal test data — Test data of the wrong type or outside the allowed values, such as -5 or letters for an age, or an empty input. The program should reject it.Value: -5 for Age (allowed 0 to 120)
Test data type: AbnormalTest value for Age: "cat"
Test data type: Abnormal
Expected outcome: RejectedIF Age < 0 THEN
OUTPUT "Rejected"
ENDIFINPUT Age
IF LENGTH(Age) = 0 THEN
OUTPUT "Rejected"IF Age < 0 OR Age > 120 THEN
OUTPUT "Rejected"
ENDIF