Digit_sum! I really can not figure out what the problem is, please help me!


#1





as is shown above, I figured out "digit_sum(434)", and it showed me the correct result 11, but the message tells me that "the function fails on digit_sum(434)".
I would be very thankful for your help!


Replace this line with your code.


#2

When a function does not return something ,by default it returns None.
You have to return the sum_num using python keyword return.
(You're printing it but not returning the sum_num)


#3

Oh my!!!!
I just corrected as you told me, it really worked out! I am a little bit relieved now, thanks a loooooot!!!!!!!


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.