Question 1 Report
A parcel depot uses a checksum algorithm before it accepts a tracking number. Fig. 1 shows the pseudocode. The program adds the first five digits, calculates the remainder after division by 10, then compares that result with the final digit. A number is accepted only when both values are the same. The code is used to identify typing errors before parcel data are added to the main file.
A driver enters the number 482736.
(a) Identify the value of total. [1]
(b) Write the value of check. [1]
(c) State the program output for this number. [1]
(d) Give the final digit that would make 48273 a correct tracking number. [1]
(a) Add the first five digits:
\[4+8+2+7+3=24\]
Therefore total is 24. [1]
(b) MOD 10 gives the remainder after division by 10:
\[24\operatorname{MOD}10=4\]
So check is 4. [1]
(c) The final entered digit is 6, but the calculated check digit is 4. They are not equal, so the output is error. [1]
(d) To make 48273 correct, its final digit must be 4. [1]
Everything you need to excel in your exams