Question: Write a function that accepts a string. The function will return the number of digits in the string. You must use a for - loop
Write a function that accepts a string. The function will return the number of digits in the string. You must use a forloop to solve this problem.
There should be three sections with a comment label: Input, Processing, and Output.
Input code that gathers information from the user.
Processing code that uses the input to support the output.
Output code that displays the results.
Only print statements are allowed in the Output section each print statement is permitted a single string literal with variables. Print statements with expressions are not allowed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
