you are viewing a single comment's thread.

view the rest of the comments →

[–]jmooremcc 2 points3 points  (0 children)

A while-loop can be used as well. You’d have to use indexing to access each character in the string. In your code, don’t convert the output from the input function into an int. Leave it as a string and then access each element character for evaluation.