Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for CheckSum by Moff
import string
def map_point(n):
return sum(divmod(n * 2, 10))
def checkio(s):
digits = [ord(c) - 48 for c in s[::-1] if c in string.digits + string.ascii_letters]
dsum = sum(map_point(d) if i % 2 == 0 else d for i, d in enumerate(digits))
return [str(10 - dsum % 10) if dsum % 10 else '0', dsum]
July 24, 2015