Question: Write a Python program that displays a message asking the user to enter a string. The program should then read a string from the keyboard.
Write a Python program that displays a message asking the user to enter a string. The program should then read a string from the keyboard. The program should then use a loop to go through the string as a sequence using indexing from beginning to end one character at a time. When a digit is found, the program should convert it to integer and add it to a total. After the loop, the program should display the sum of the digits that were in the string.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
