Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_of_digits(n):
- sum = 0
- while n > 0:
- sum += n % 10
- n = n // 10
- return sum
- def sum_of_digits_till_inf(n):
- while n >= 10:
- n = sum_of_digits(n)
- return n
- def numerology_of_date(date):
- d = sum_of_digits_till_inf(date["day"])
- m = sum_of_digits_till_inf(date["month"])
- y = sum_of_digits_till_inf(date["year"])
- return sum_of_digits_till_inf(d + m + y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement