Problem
You will create a bar code reader and validator. Input is a file of bar codes. A valid bar code meets this criteria: Sum the values in the even spaces of the bar code. Sum the values in the odd spaces of the bar code, excluding space 13. Multiply sum of evens by 3. Add the tripled sum of evens to sum of odds. The sum of the last digit of that final sum plus the 13th digit of the barcode is 10.
If you can, also put comments on it so I can understand and learn the process by which you obtained your answer.