0
I need help with a rounding-up program or function in python
5 Answers
0
import math
math.ceil()
+ 1
Thank you
+ 1
U can use one of these :
from math import floor, ceil
print(ceil(1.4)) >>>> 2
print(floor(3.8))>>>> 3
Or round function it's a built in function you don't need to import it
round(number, ndigits):
round(10.7)>>> 11
round(10.4)>>>> 10
round(10.6754, 1)>>>> 10.6
0
How do you access it from the math module