UPC Assignment 1 Sample problems
Consider the following UPC-A code. Is it a valid UPC?
Consider the following UPC-A code. Is it a valid UPC? The answer is Yes
How can we get ? 1.odd-digit sum: =20 2.even-digit sum: =13 3.odd*3+even = 20*3+13=73 4.mod 10: 73 mod 10 = 3 5.subtract from 10=10-3=7
Consider the following UPC-A code. What is the missing digit (shown as a question mark)? ?
The answer is 3
How can we get ? 1.odd-digit sum: =17 2.even-digit sum: =16 3.odd*3+even = 17*3+16=67 4.mod 10: 67 mod 10 = 7 5.subtract from10=10-7=3
Consider the following UPC-A code. What is the missing digit (shown as a question mark)? 0 70?
The answer is 3
How can we get ? 1.odd-digit sum: =20 2.even-digit sum: 7+x+0+0+0=7+x 3.odd*3+even = 20*3+7+x=67+x 4.mod 10: (67+x)mod 10 5.checking number is 0, so (67+x)mod10=0 =>x=3
Consider the following UPC-A code. What is the missing digit (shown as a question mark)? 0 787?
The answer is 8
How can we get ? 1.odd-digit sum: 0+8+x+5+7+8=28+x 2.even-digit sum: =26 3.odd*3+even = (28+x)*3+26=110+3x 4.subtract from 10: 10-(110+3x)mod10=6 =>(110+3x)mod10=4 =>x=8