4. Digit_sum


I just reached this part in the lesson and have no idea how to complete it. I have looked at other peoples questions and still have no idea what the stuff is their talking about. e.g the maps and stuff. I do not believe I am up up to this level even though I have completed everything else before it. Anyone have any ideas on what to do?
this is what I came up with I could've spent more time on it but I don't think I could do anything else wihout copying someone else's coding that I do not understand


don't use map(), i have seen this solution, i advise against it

The lesson recommends you to use str() to convert the number to a string so you can loop over it, and int() to convert the loop iterator back to an integer so you can add it total

This exercises are really pushing you to think more about design of your program and so on, yes, there are challenging, maybe you can look up online how you could improve on your thinking steps? Look up pseudo code


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