summaryrefslogtreecommitdiff
path: root/progs/a929.py
blob: 1ae5aa111c45e111f4c4b1ac685b04edd50ed377 (plain)
1
2
3
4
5
def sum_digits(n):
  if n == 0:
    return 0
  else:
    return n % 10 + sum_digits(int(n / 10))