In Python, math module contains a number of mathematical operations, which can be performed with ease using the module.
math.ceil() function returns the smallest integral value greater than the number. If number is already integer, same number is returned.
Syntax: math.ceil(x) Parameter: x: This is a numeric expression. Returns: Smallest integer not less than x.
The ceil of 33.7 is : 34
math.ceil(-13.1) : -13 math.ceil(101.96) : 102
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.