In Python, math module contains a number of mathematical operations, which can be performed with ease using the module.
math.floor() function returns the largest integer not greater than x. If number is already integer, same number is returned.
Syntax: math.floor(x) Parameter: x: This is a numeric expression. Returns: largest integer not greater than x.
The floor of 33.7 is : 33
math.floor(-13.1) : -14 math.floor(101.96) : 101
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.