Home >>Python math Module >Python math.floor() Method
Python math.floor() method in python is used to returns the floor of given number value x downwards to the nearest integer, a number value that is not greater than x.
Syntax:math.floor(x)
Parameter | Description |
---|---|
X | It is required a number to return the floor of a number |
import math
print(math.floor(1.3))
print(math.floor(0.24))
print(math.floor(4.8))a
print(math.floor(-12.6))
import math
print(math.floor(5))
print(math.floor(4))
print(math.floor(3))
print(math.floor(2))