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 (confirm("Delete this file?")) { deleteFile(); } | Apassword_entry = Entry(window, show="*") | |
| 2undoStack.pop() | BThe account is deleted immediately with no confirmation, so one accidental click causes permanent harm. | |
| 3A clear warning tells users what will be lost before they continue, so they can avoid a harmful mistake | CRemoves the last saved action so the user can reverse a mistake and recover from it | |
| 4Protecting personal data means hiding sensitive input so others cannot see it | DThe message is unclear, so the user cannot tell what went wrong or how to recover from the error. | |
| 5deleteButton.onclick = deleteAccount; | EAsks the user to confirm before a destructive action runs, preventing an accidental delete | |
| 6showMessage("Error 0x4F") | Fmessagebox.askyesno("Warning", "This will erase all your work. Continue?") |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
safety — A useability principle: the interface prevents harmful mistakes, such as with confirmation, clear warnings and data protection, and lets users recover from errors, such as with undo.if messagebox.askyesno("Delete?", "Sure?"):
delete_file()history.append(text)
text = history.pop()pw = Entry(win, show="*")messagebox.showwarning("Warning", "Sure?")ok = messagebox.askyesno("Delete", "Sure?")
if ok:
delete_file()