I'm trying to create a module that will separate the decimal from a number as I need it for a project. However when I test it the integer comes out fine but the decimal always gets an error:
def seperate(decimal):
integer = int(decimal)
dec = decimal-integer
print(dec, integer)
if I say try to enter 2015.677 it give this: 0.6769999999999072 2015
what is wrong?