Skip to content
CodeItRaw
Code Reading
/
Digit Sum
Path
Play
Daily
Leaderboard
tr
Break the Code
Digit Sum
Write a number for which this function gives the wrong answer.
1
def
digit_sum
(n):
2
total =
0
3
while
n >
9
:
4
total += n %
10
5
n = n //
10
6
return
total