def digital_root(input): string = str(input) number = 0 for num in string: number+=int(num) return number
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)