Important Notice:

Course Content
The Calendar Module
Library Function/Predefined Functions
0/4
Sys Module
Library Function/Predefined Functions
0/2
OS Module
Library Function/Predefined Functions
0/2
Functions in Python (Chapter-10) M3-R5
About Lesson

ceil():-

        It returns the smallest integer number which is greater than or equal to integer.

Example:-

import math

print(math.ceil(35.3))

print(math.ceil(-35.50))

 

Output

36

-35

 

#Import math library

import math

#Round a number upward to its nearest integer

print(math.ceil(1.4))                   # 2

print(math.ceil(5.3))                   # 6

print(math.ceil(-5.3))                 # -5

print(math.ceil(22.6))                 # 23

print(math.ceil(10.0))                 # 10

 

error: Content is protected !!