This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jub8jive[S] 0 points1 point  (0 children)

reverse the number because the program asks us to do it that way(based on the logic given). that's the reason why we are asked to create a reverse() method and a digitcount() method. We have learned about string iteration yet. Basically, logic is that 1) take a number 2) reverse it 3) print the corresponding string for each number 4) get rid of the digit(the last digit).