← QCE Digital Solutions Unit 3

Useability principle: error tolerance

A useability principle: the interface prevents mistakes where it can, and helps users notice and recover from the ones they make, using validation, confirmation prompts and undo.

Understanding Useability principle: error tolerance in QCE Digital Solutions Unit 3

What it does: Removing the most recent action from the history list reverses it. This is how an undo feature gives users a way to recover from errors. The range check rejects impossible ages before they are stored. This is input validation, which prevents errors and so makes the interface more error tolerant. A confirmation prompt gives the user a chance to stop and rethink before a hard-to-reverse action goes ahead. With no confirmation and no undo, a single accidental tap causes permanent loss. The other design prevents and allows recovery from the mistake. A tolerant interface notices the problem and explains how to fix it. A crash gives the user no way to recover.

Common mistakes: The validation check is reversed. It rejects long passwords and lets short ones through. It should be if len(pw) < 8: so that passwords which are too short are caught before they are saved. Undo should restore the previous state, which is the last item left after pop(). Using history[0] jumps back to the oldest state and throws away all of the user's recent work. It should be text = history[-1].

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 128–176) and word search (Modules 15–176).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A form refuses to submit and highlights an email field that is missing the @ symbol. Which part of error tolerance is this?
Input validation catching a mistake before it is savedUndo reversing a mistake after it is saved
Matches
deleteAccount(); // runs straight away, no prompt
↓
There is no confirmation prompt, so one accidental click permanently deletes the account with no chance to notice or recover. Add a confirm step first.
Applying
Meanings
Term
error tolerance
Meaning
A useability principle: the interface prevents mistakes where it can, and helps users notice and recover from the ones they make, using validation, confirmation prompts and undo.
Practice
<form>
Testing
Gaps
if age.():
Check Answer
Spots
1pw = input("Password: ")
2if len(pw) > 8:

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Dumbo Octopus' badge — Module Maker, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A form refuses to submit and highlights an email field that is missing the @ symbol. Which part of error tolerance is this?
A. Undo reversing a mistake after it is saved
B. Input validation catching a mistake before it is saved ✓
Validation checks data as it is entered, so the mistake is prevented from entering the system. Undo works after an action has already happened.
2. A student taps 'Delete project' and the app asks 'Delete this project permanently? Yes / Cancel'. What is the prompt doing?
A. Preventing an accidental, serious action by asking the user to confirm ✓
B. Validating that the project name is in the correct format
A confirmation prompt gives the user a chance to stop and rethink before a hard-to-reverse action goes ahead.
3. Which design is MORE error tolerant for a photo-editing app?
A. A tutorial that tells users to be careful with each editing tool
B. An Undo button that restores the photo to its state before the last change ✓
Error tolerance means the interface helps users recover from mistakes. Warning users to be careful does not give them a way to recover.
4. A date-of-birth field only lets users pick a day from a calendar, so a date like 31 February cannot be entered. Which is the best description?
A. It prevents errors by limiting input to valid values ✓
B. It helps users recover from errors by letting them undo them
Restricting input to valid choices is a form of input validation, which prevents mistakes rather than fixing them afterwards.
5. Which interface is LESS error tolerant?
A. A 'Clear all data' button that wipes the data instantly with no warning and no undo ✓
B. A 'Clear all data' button that asks for confirmation and offers undo for 10 seconds
With no confirmation and no undo, a single accidental tap causes permanent loss. The other design prevents and allows recovery from the mistake.

Match the Pairs

if (!email.includes("@")) { showError(); } → Input validation: the system checks what the user typed and flags a problem before the mistake is saved.
confirm("Delete this file?") → A confirmation prompt: it makes the user pause and check before an action that is hard to reverse.
Undo lets users recover from a mistake by reversing the last action they took. → if (history.length > 0) { history.pop(); }
Preventing mistakes: a form accepts only an age in a sensible range, so typing errors are caught early. → if (age < 0 || age > 120) { showError(); }
deleteAccount(); // runs straight away, no prompt → There is no confirmation prompt, so one accidental click permanently deletes the account with no chance to notice or recover. Add a confirm step first.
if (age < 0) { showError("Error 42"); } → The error message is vague and the check is incomplete. Users need a clear message such as 'Enter an age between 0 and 120' to fix the problem and recover.

Key Term

error tolerance
A useability principle: the interface prevents mistakes where it can, and helps users notice and recover from the ones they make, using validation, confirmation prompts and undo.

Fill in the Blanks

1. age = entry.get() if age.isdigit(): save(age)
Hint: Type the string method that checks the text holds only digits, so bad input is blocked before it is saved.
2. ok = messagebox.askyesno("Delete", "Sure?") if ok: delete_file()
Hint: Type the messagebox function that asks a yes or no confirmation question before a risky action.
3. history.append(text) def undo(): return history.pop()
Hint: Type the list method that removes and returns the last saved item so the user can step back.
4. if score < 0 or score > 100: show_error("Enter 0 to 100")
Hint: Type the comparison operator that catches a score above the allowed maximum.
5. try: n = int(entry.get()) except ValueError:
Hint: Type the keyword that catches a bad input error so the program can recover instead of crashing.

Spot the Error

Question 1
A pw = input("Password: ")
B if len(pw) > 8:
C print("Use 8+ characters")
D else:
E print("Saved")
Line B — The validation check is reversed. It rejects long passwords and lets short ones through. It should be if len(pw) < 8: so that passwords which are too short are caught before they are saved.
Question 2
A history = ["H", "Hi", "Hi!"]
B if len(history) > 1:
C history.pop()
D text = history[0]
Line D — Undo should restore the previous state, which is the last item left after pop(). Using history[0] jumps back to the oldest state and throws away all of the user's recent work. It should be text = history[-1].
Question 3
A def delete_file():
B answer = input("Delete? y/n ")
C if answer != "y":
D remove(name)
Line C — The confirmation logic is inverted. The file is deleted when the user says no and kept when they say yes. The condition should be if answer == "y": so that deletion only happens after the user confirms.
Question 4
A name = input("Name: ")
B while name.strip() != "":
C print("Name is required")
D name = input("Name: ")
Line B — The loop condition is wrong. It repeats when the user has entered a valid name and accepts an empty field. It should be while name.strip() == "": so the user is asked again only while the field is empty.
Question 5
A while age < 0 and age > 120:
B print("Enter 0 to 120")
C age = int(input("Age: "))
Line A — No number can be below 0 and above 120 at the same time, so the validation loop never runs and bad ages get through. The range check needs or: while age < 0 or age > 120:.

Student with a class code? Join your class →