Log in
← All problems

Sum of digits

easyMaths and loops10 XP

Return the sum of the digits of the whole number n (ignore a minus sign).

Examples

Examples use JSON: true/false/null are True/False/None in Python.

Run examples checks the examples above. Submit also runs 3 hidden tests.