Project: ISBN Check Digits
Error detection and correction are important requirements for reliable elec-
tronic communication. A common error detection technique is to append a
check digit to the end of a piece of data, where the check digit is calculated
from that data. After receiving transmission of data with a check digit, the re-
ceiver can perform the same calculation, and if the check digits do not match,
then there must have been an error and the data can be resent. Check digits
are used in UPC bar codes, credit card numbers, and ISBNs.
The check digit of a 10-digit ISBN is calculated from the first nine digits d
0
,
d
1
, . . . , d
8
as
(1d
0
+ 2d
1
+

Get A Concise Introduction to Programming in Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.