Sum of digits
easyMaths and loops10 XP
Return the sum of the digits of the whole number n (ignore a minus sign).
Examples
- Input: n = 1234Output: 10
- Input: n = 0Output: 0
Examples use JSON: true/false/null are True/False/None in Python.