(n)
| 2 | |
| 3 | # Find sum of digits of a number |
| 4 | def sumDigits(n): |
| 5 | tot = 0 |
| 6 | while(n > 0): |
| 7 | tot += n % 10 |
| 8 | n //= 10 |
| 9 | return tot |
| 10 | |
| 11 | # Recursively find sum of digits till the number is single digit |
| 12 | def sumOfDigits(n): |
no outgoing calls
no test coverage detected