The greatest integer function is a function (real numbers function) to itself that is defined as follows: it sends any real number to the largest integer that is less than or equal to it.
Python code to find greatest integer (Use of floor() method)
# Python code to find greatest integer
# (Use of floor() method)
import math #importing class
num = float(input("Enter any float number: "))
print("math.floor(num): ", math.floor(num))
num = float(input("Enter another float number: "))
print("math.floor(num): ", math.floor(num))
Output
Enter any float number: 56.892
math.floor(num): 56
Enter another float number: -34.567
math.floor(num): -35
Python code to find greatest integer (Use of floor() method)
Output