This function will return the ceiling value of the number passed as a parameter.
Ceiling value is the smallest integer greater than or equal to the given number.
math.ceil(x)
For example :
1. Ceiling value of 11.7 is 12
The smallest integer greater than 11.7 is 12.
2. Ceiling value of 12 is 12.
12 is an integer and the smallest integer is equal to 12.
3. Ceiling value of 12.3 is 13
required parameter
x must be a number you want to round to its ceiling value.
If x is not a number then TypeError occurs.
In Python3.x
Return an integer which denotes the ceiling value
In Python2
Return a float value which denotes the ceiling value
Output :
If parameter passed is not a number then TypeError will occur
### This article is contributed by Mohit Raj
Comments