← The arcade

Decoders · difficulty 2 of 3

Barcode check digit (EAN-13) 🏷️

Compute the 13th digit of a barcode from its first 12: weight digits alternately 1 and 3 starting from the left, sum, and the check digit is what you add to reach the next multiple of 10.

This one is part of Pro. Plenty of arcade challenges are free to play right now.

Skills: strings, dicts, regex

Open the arcade