Question: Write a function that reserves a number containing a fraction and then do this The function returns the sum of all the digits of the
Write a function that reserves a number containing a fraction and then do this The function returns the sum of all the digits of the fraction. Use the following definition for the function: def sumDigits (number): Note: It is forbidden to use strings and arrays in solving the question Example: When calling the function as follows: sumDigits (345.546) It returns 27.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
