It’s also possible to convert floating-point variables to integers by removing everything that comes after the decimal point. To do that we can write:
num = 43243.6350207935 res = int(num) print(res, num)
This program would print
43243 43243.6350207935. So, the
resis an integer, while
numis a floating-point value.
Given a floating-point number, remove the digits before the decimal point.