Решение:
x = float(input()) print(x - int(x))
Почему так происходит?
x = float(input()) print(x - int(x))
rodion1010
Дано положительное действительное число X. Выведите его дробную часть.
x = input('Enter positive floating point number:') print( 'Fractional part of your number is ', '.' + x.split('.')[1] if len(x.split('.')) > 1 else 'absent, sorry...')
from decimal import Decimal x = Decimal('17.9') print(x - int(x))