Answer:
Step-by-step explanation:
The following was coded in Python as requested. It is a function that takes in a number as a parameter. It then uses the Python built-in math class as well as the modf() method to split the whole number and the decimal, these are saved in two variables called frac and whole. These variables are printed at the end of the program. The program has been tested and the output can be seen below.
import math
def seperateInt(number):
frac, whole = math.modf(number)
print("Whole number: " + str(math.floor(whole)))
print("Decimals number: " + str(frac))