Question: . Write a function named productDigit ( s ) that accepts a string s as the argument. Assume this string contains a series of single

. Write a function named productDigit(s) that accepts a string s as the argument. Assume this string contains a series of single-digit numbers. Use a for loop to loop through each character in the string, then calculate and return the product of all the single-digit numbers in the string. For example, if the argument is '1357', your function should return 105, because 1x3x5x7=105.(25 pts)
Write a function named productDigit(s) that accepts a string s as the argument. Assume this string contains a series of single-digit numbers. Use a for loop to loop through each character in the string, then calculate and return the product of all the single-digit numbers in the string. For example, if the argument is '1357', your function should return 105, because 1x3x5x7=105.(25 pts)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!