I'm doing the digit_sum exercise on the Practice makes perfect section of the Python course in Codecademy
I'm getting the message:
Oops, try again. Your function fails on digit_sum(434). It returns 4 when it should return 11.
added_number = 0
for i in str(n):
added_number += int(i)
number = raw_input("Enter your chosen number here: ")
When I run the code, it prompts for the user input. I enter: 1234
This is the output:
Enter your chosen number here: 1234
I have no idea what I'm doing wrong. I don't see where 4 is returned. Please help.