math.ceiling python code example
Example 1: python ceiling
import math
n = 2.5
print(str(math.ceil(n)))
Example 2: ceil function in python
import math
print(math.ceil(5.3))
output = 6
Example 3: python ceiling
def ceildiv(a, b):
return -(-a // b)
Example 4: ceil function in python
import math
print(math.floor(5.3))
output = 6