how to return a number that is the subtraction of the sum of the digits of the whole part and the sum of the digits of the decimal part in python [closed]

1

I know that this is not a task site or anything because of this style, but I really could not with a workshop point that I was left in, you could help me please, I tried to see it somewhere but I block with is to take the sum of the whole and decimal part.

Perform a function that receives a greater number (>) than 0 and less (<) of 1000 with up to three (3) decimals (eg 14.201, 28.3, 919.07), and return a number that is the subtraction of: The sum of the digits of the whole part and the sum of the digits of the decimal part.

Example of numbers to return: 14.201 (5 - 3) = > two 28.3 (10 - 3) = > 7 919.07 (19 - 7) = > 12

    
asked by margarita gutierrez 14.02.2017 в 01:30
source

0 answers