<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
It doesn’t. When I try the code IDLE it works flawlessly but when I try it in CodeAcademy it throws up the following error “Your function fails on digit_sum(434). It returns None when it should return 11.”
<What do you expect to happen instead?>
The code to. I have tried digit_sum(434) on IDLE and it gives 11. There are no formatting errors in my code.
This is annoying as I can’t access the next challange due to this.
result = 0
for i in str(n):
result += int(i)
<do not remove the three backticks above>