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 | |
|---|---|---|
| 1confirm("Delete this file?") | A<select name="year"><option>11</option><option>12</option></select> | |
| 2undoStack.pop() | BAsks the user to confirm before a destructive action, preventing accidental deletion | |
| 3Limiting input choices prevents invalid entries by letting the user pick only from allowed options | Cprint("Age must be a number from 12 to 18") | |
| 4A clear error message tells the user what went wrong and how to fix it | DThe record is deleted straight away with no confirmation, so one accidental click causes permanent data loss. | |
| 5if clicked(deleteButton) then deleteRecord() | EReverses the most recent action so the user can recover from a mistake | |
| 6print("Error 402") | FThe error message is vague. It does not explain the problem or how the user can fix it. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
error tolerance — An interface design quality where mistakes are prevented, reasonable input variations are accepted, and users can easily recover, such as with undo, confirmations and clear error messages.print "Delete this record? yes/no"
input choice
if choice = "yes" thenlastDeleted ← record
delete record
record ← lastDeletedif age < 0 or age > 120 then
print "Enter an age between 0 and 120"
end ifallowed ← ["Red", "Blue", "Green"]
input house
if house not in allowed theninput answer
answer ← lowercase(answer)
if answer = "yes" then