Typing errors that a check digit detects

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Typing errors that a check digit detects

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A user types the number 4512 as 4152. Which typing error is this?
A Omitted digit
B Transposition error
2. A user types 7934 as 7834. Which typing error is this?
A Incorrect digit
B Transposition error
3. A user types 12345 as 1235. Which typing error is this?
A Extra digit
B Omitted digit
4. A user types 2468 as 24668. Which typing error is this?
A Extra digit
B Omitted digit
5. Which typing error is a check digit designed to detect?
A Two digits swapped by mistake
B Interference changing a signal on a cable

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Typed 4519 instead of 4529 ATyped 459 instead of 4529
2Typed 4592 instead of 4529 BA transposition error: two digits were swapped, so the check digit calculation gives a different result
3An omitted digit error: a digit is left out when the number is typed, so the number is too short CThe same digits in the wrong order is a transposition error. The check digit calculation uses weights by position, so the result changes and the error is detected.
4An extra digit error: an additional digit is typed that should not be there, so the number is too long DA check digit does not just check length. It recalculates from the digits, so it can detect a wrong digit and swapped digits too, as well as missing or extra digits.
5A student says: "4529 typed as 4259 is not an error because it has the same digits" ETyped 45529 instead of 4529
6A student says: "A check digit only checks that the number has the right length" FAn incorrect digit error: one digit was typed wrongly, so the check digit no longer matches

Definitions

check digit

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
IF ______(entered) <> 10 THEN OUTPUT "Digit missing or extra" ENDIF
2.
IF calculated __ checkDigit THEN OUTPUT "Wrong digit entered" ENDIF
3.
IF LENGTH(entered) _ 10 THEN OUTPUT "Omitted digit" ENDIF
4.
IF LENGTH(entered) _ 10 THEN OUTPUT "Extra digit typed" ENDIF
5.
IF calculated <> checkDigit ____ OUTPUT "Digits swapped: transposition" ENDIF

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A number ← "4719"
B typed ← "4179"
C // digits 2 and 3 are swapped
D OUTPUT "Omitted digit error"
Question 2
A number ← "4719"
B typed ← "479"
C OUTPUT "Extra digit error"
Question 3
A // A check digit fixes typos
B correct ← "4719"
C typed ← "4729"
D OUTPUT "Wrong digit error"
Question 4
A correct ← "4719"
B typed ← "47195"
C IF LENGTH(typed) < 4 THEN
D OUTPUT "Extra digit"
E ENDIF
Question 5
A correct ← "4719"
B typed ← "47195"
C IF LENGTH(typed) < 4 THEN
D OUTPUT "Omitted digit"
E ENDIF

Answer Key

Typing errors that a check digit detects
Section A: Quick Questions
Q1
B — Transposition error
Q2
A — Incorrect digit
Q3
B — Omitted digit
Q4
A — Extra digit
Q5
A — Two digits swapped by mistake
Section B: Match the Pairs
Q1
Typed 4519 instead of 4529 → An incorrect digit error: one digit was typed wrongly, so the check digit no longer matches
Q2
Typed 4592 instead of 4529 → A transposition error: two digits were swapped, so the check digit calculation gives a different result
Q3
An omitted digit error: a digit is left out when the number is typed, so the number is too short → Typed 459 instead of 4529
Q4
An extra digit error: an additional digit is typed that should not be there, so the number is too long → Typed 45529 instead of 4529
Q5
A student says: "4529 typed as 4259 is not an error because it has the same digits" → The same digits in the wrong order is a transposition error. The check digit calculation uses weights by position, so the result changes and the error is detected.
Q6
A student says: "A check digit only checks that the number has the right length" → A check digit does not just check length. It recalculates from the digits, so it can detect a wrong digit and swapped digits too, as well as missing or extra digits.
Section C: Definitions
Q1
check digit — An extra digit worked out from the other digits in a number. It catches typing errors: a wrong digit, two digits swapped (transposition), a missing digit or an extra digit.
Section D: Fill in the Blanks
Q1
IF LENGTH(entered) <> 10 THEN OUTPUT "Digit missing or extra" ENDIF
Q2
IF calculated <> checkDigit THEN OUTPUT "Wrong digit entered" ENDIF
Q3
IF LENGTH(entered) < 10 THEN OUTPUT "Omitted digit" ENDIF
Q4
IF LENGTH(entered) > 10 THEN OUTPUT "Extra digit typed" ENDIF
Q5
IF calculated <> checkDigit THEN OUTPUT "Digits swapped: transposition" ENDIF
Section E: Spot the Error
Q1
D — 4719 became 4179, so two digits were swapped. That is a transposition error, not an omitted digit. The output should be "Transposition error".
Q2
C — The typed number 479 is missing the digit 1, so it is an omitted digit error. An extra digit error would mean a digit had been added.
Q3
A — A check digit only detects typing errors. It cannot fix them. The comment should say it detects typos, and the user must re-enter the number.
Q4
C — An extra digit makes the typed number longer than the correct one. The test should be LENGTH(typed) > 4, not < 4.
Q5
B — An omitted digit makes the typed number shorter, so typed should be "479" (the 1 is missing). "47195" has an extra digit, so the test for a shorter number would never be true.