Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from Tkinter import *
- EAN = raw_input(" Introduzca número: ")
- def eanCheck():
- checksum = 0 for i, digit in enumerate(reversed(ean)):
- checksum += int(digit) * 3
- if (i % 2 == 0):
- else
- int(digit) :
- return (10 - (checksum % 10)) % 10
- print "Digito de control: %d" %eanCheck(EAN)
- root= Tk()
- root.title("Calculo digito de control")
Add Comment
Please, Sign In to add comment