Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

6.8 (2 of 4): Data entry errors and how to stop them

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

50 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

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

WordWhat it meansExample
Data entryTyping or choosing data to put it into a system.Filling in a form
Transcription errorA wrong, missing or extra character in copied data.Smith typed as Smyth
Transposition errorA mistake where two characters next to each other swap places.1234 typed as 1324
ValidationA check that a value is sensible and the right shape.A phone number has 11 digits.
VerificationA check that a value was typed in correctly.Type your email twice.
Double entryTyping data twice and checking both match.A password box and a confirm box
Drop-down menuA list you pick from instead of typing.Year 12 or Year 13
Pre-filled boxA 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 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Transcription 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

CorrectTypedType of errorWhy it happens
SmithSmythTranscriptionHeard it, did not check
07700 90012307700 900132TranspositionFingers went too fast
LS1 1ABLS1 1A8TranscriptionB and 8 look alike
LeedsLeesTranscriptionA letter is missing
20262062TranspositionTwo digits swapped

The cells students fill in are left blank in this preview.

Try it: find the difference

Code: python
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

A tree from "Data entry errors" to four ways: "Validation of input" leads to "Refuse values that are not sensible", "Verification by double entry" leads to "Type twice, and the two must match", "Drop-down menus" leads to "Pick from a list, no typing", and "Pre-filled boxes" leads to "A likely answer is already there".A tree from "Data entry errors" to four ways: "Validation of input" leads to "Refuse values that are not sensible", "Verification by double entry" leads to "Type twice, and the two must match", "Drop-down menus" leads to "Pick from a list, no typing", and "Pre-filled boxes" leads to "A likely answer is already there".

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

Code: python
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?

MethodStopsWeak point
ValidationImpossible valuesA wrong but sensible value gets through
Double entryMost typing mistakesTakes the user longer
Drop-down menuSpelling and typing mistakesOnly works for short, fixed lists. A person can still pick the wrong item.
Pre-filled boxMissing or empty valuesPeople 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

  1. 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.
  2. 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).
  3. 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).
  4. 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).
  5. 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.

Code: python
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.

Code: web
<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 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Remember

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.

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.