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
|