Question: In python Write a function that reserves a number containing a fraction and then do this The function returns the sum of all the digits

In python

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

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 Databases Questions!