csc-python-solutions/16/4 - Digital Root.py
2021-02-17 12:53:29 +01:00

6 lines
96 B
Python

def digitalRoot(n):
if n<10:
return n
else:
return digitalRoot(digitalSum(n))