Two numbers, two people
A shop writes a phone number from a paper form into a computer.
The form says 07700 900123. The shop types 07700 900132. Two digits swapped places. The delivery text goes to a stranger.
Nobody did it on purpose. Typing is easy to get wrong. How can a form stop it?
Key words
| Word | What it means | Example |
|---|---|---|
| Data entry | Typing or choosing data to put it into a system. | Filling in a form |
| Transcription error | A wrong, missing or extra character in copied data. | Smith typed as Smyth |
| Transposition error | A mistake where two characters next to each other swap places. | 1234 typed as 1324 |
| Validation | A check that a value is sensible and the right shape. | A phone number has 11 digits. |
| Verification | A check that a value was typed in correctly. | Type your email twice. |
| Double entry | Typing data twice and checking both match. | A password box and a confirm box |
| Drop-down menu | A list you pick from instead of typing. | Year 12 or Year 13 |
| Pre-filled box | A box that already holds a likely answer. | Today's date |
The cells students fill in are left blank in this preview.
Quick check: spot the error
Have a go
Quick check: spot the error
3 questionsTranscription errors
To transcribe is to copy. A transcription error is a mistake when copying data. A character is wrong, missing, or extra.
"Smith" becomes "Smyth" (wrong). "Leeds" becomes "Lees" (missing). The number 0 and the letter O look the same, so people mix them up.
Transposition errors
A transposition error is a special mistake. Two characters next to each other swap places.
1234 becomes 1324. "form" becomes "from". The same characters are there, but in the wrong order. The person usually does not see it because the data looks right.
Examples side by side
| Correct | Typed | Type of error | Why it happens |
|---|---|---|---|
| Smith | Smyth | Transcription | Heard it, did not check |
| 07700 900123 | 07700 900132 | Transposition | Fingers went too fast |
| LS1 1AB | LS1 1A8 | Transcription | B and 8 look alike |
| Leeds | Lees | Transcription | A letter is missing |
| 2026 | 2062 | Transposition | Two digits swapped |
The cells students fill in are left blank in this preview.
Try it: find the difference
typed = "07700900132"
correct = "07700900123"
for place in range(len(typed)):
if typed[place] != correct[place]:
print("Different at place", place + 1, ":", typed[place], "should be", correct[place])
# Two places are different, and they are next to each other.
# That is a transposition. Change typed to "07700900124" and run again.
Make a free account to save your work and track your progress.
Match the mistake to its type
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Why do people make them?
Tired, busy people do the typing. Handwriting is hard to read. Keys are close together. Digits and letters look alike. Long numbers have no meaning, so the brain does not notice a swap.
People will always make mistakes. You can build the form to catch them.
Four ways to stop errors
How each method stops errors
Validation: the form refuses a phone number with 9 digits. It cannot say which digit is wrong.
Verification by double entry: type the email twice. If the two are different, ask again. Two matching mistakes are very rare.
Drop-down menu: pick "Year 12". You cannot type "Yer 12".
Pre-filled box: the date box already holds today's date. You only change it if you need to.
Try it: double entry
first = "[email protected]"
second = "[email protected]"
if first == second:
print("Thank you")
else:
print("The emails do not match. Please type again.")
# Change second so that it is the same as first and press Run again.
Make a free account to save your work and track your progress.
Which method stops which error?
| Method | Stops | Weak point |
|---|---|---|
| Validation | Impossible values | A wrong but sensible value gets through |
| Double entry | Most typing mistakes | Takes the user longer |
| Drop-down menu | Spelling and typing mistakes | Only works for short, fixed lists. A person can still pick the wrong item. |
| Pre-filled box | Missing or empty values | People may accept a wrong default |
The cells students fill in are left blank in this preview.
Match the problem to the fix
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Watch: data entry errors
Press Play on the short film below. It starts with a phone number that has two digits swapped. Then it names both kinds of error and the four ways to stop them, and ends with a myth.
Film: data entry errors
Data entry errors and how to stop them
Every scene, as text
- Two numbers, two people. The form says 07700 900123. The shop types 07700 900132 (error: two digits swapped places). The delivery text goes to a stranger.
- Transcription errors. Transcription error: a wrong, missing or extra character in copied data. LS1 1AB typed as LS1 1A8 (error: a wrong character; why: B and 8 look alike). 5678 typed as 567 (error: a missing digit). "London" typed as "Londone" (error: an extra letter).
- Transposition errors. Transposition error: a mistake where two characters next to each other swap places. 07700900123 typed as 07700900132 (places: 10 and 11, next to each other). 2026 typed as 2062 (type: transposition). 5678 typed as 5876 (why: 6 and 8 are not next to each other; type: transcription, not neighbours).
- Four ways to stop errors. Validation: a check that a value is sensible and the right shape (stops: impossible values). Double entry: typing data twice and checking both match (stops: most typing mistakes). Drop-down menu: a list you pick from instead of typing (stops: spelling and typing mistakes). Pre-filled box: a box that already holds a likely answer (stops: missing or empty values).
- Myth (false): validation stops all errors. That is not true: a wrong but sensible value gets through. 07700900132 has 11 digits (so: validation lets the swap through). Double entry: [email protected], then [email protected] (verification: was it typed in correctly?; so: no match, the form asks again).
Your turn: find the errors
Write four small functions for a data entry system. The first counts the places where two texts differ. The second finds a transposition. The third names the type of error. The fourth checks a phone number. Read the comments in the starter. Press Run Tests to check.
def differences(typed, correct):
# Count the places where the two texts are different.
# They are the same length. If the lengths are not the same, give back -1.
# Example: differences("12345", "12354") is 2.
return 0
def is_transposition(typed, correct):
# A transposition is when two NEXT-TO-EACH-OTHER characters swap places.
# Give back True only if swapping one such pair in typed makes correct.
# "1234" and "1324" is True. "1234" and "1432" is False. Two equal texts is False.
return None
def error_type(typed, correct):
# Give back "none" if the two are the same.
# Give back "transposition" if is_transposition says so.
# Otherwise give back "transcription".
return ""
def valid_phone(text):
# A UK mobile phone number for this form: exactly 11 characters,
# all digits, and the first digit is 0.
# Give back True or False.
return None
Make a free account to save your work, or press Start lab to work through the whole lesson.
Your turn: build a better form
Make the trip form better. 1. Change the Year group box into a drop-down menu with Year 12 and Year 13. 2. Pre-fill the Trip date box with 2026-11-20. 3. Add a line of text under the second email box that says why we ask for it twice. Extra, if you want more: 4. In the JavaScript, check that the two emails match and show a message. Your teacher will look at the preview.
<h1>Trip sign-up</h1>
<form id="trip">
<p><label>Name <input id="name"></label></p>
<p><label>Year group <input id="year"></label></p>
<p><label>Trip date <input id="date"></label></p>
<p><label>Email <input id="email"></label></p>
<p><label>Type your email again <input id="email2"></label></p>
<button type="submit">Send</button>
</form>
<p id="message"></p>
Make a free account to save your work, or press Start lab to work through the whole lesson.
Key words crossword
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Final check
Have a go
Final check
5 questionsRemember
Tip
Two kinds of error: transcription (a wrong, missing or extra character) and transposition (two next to each other swap). Four fixes: validation, double entry, drop-down menus and pre-filled boxes.