Guest User

Untitled

a guest
Apr 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. from Tkinter import *
  2. EAN = raw_input(" Introduzca número: ")
  3. def eanCheck():
  4. checksum = 0 for i, digit in enumerate(reversed(ean)):
  5. checksum += int(digit) * 3
  6. if (i % 2 == 0):
  7. else
  8. int(digit) :
  9. return (10 - (checksum % 10)) % 10
  10. print "Digito de control: %d" %eanCheck(EAN)
  11. root= Tk()
  12. root.title("Calculo digito de control")
Add Comment
Please, Sign In to add comment