Digit_sum


#1

I’m curious about this because i didn’t think it made a difference and i’d like to understand why.
In the screen shot I have identical code, with the exception of the order of string and empty digit_list.

why does this order produce a different output?


#2

out of curiosity I rewrote the code and no neither is working. I don’t know what I am missing and why the initial code works but when i rewrite it, it does not.


#3

Your return is inside the loop so returns on the first iteration.

Please remember to include a link to the exercise when posting a new question.

Digit_sum


#4

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