0

I need help with a rounding-up program or function in python

28th May 2020, 6:24 PM
Sky
Sky - avatar
5 Answers
0
import math math.ceil()
28th May 2020, 6:45 PM
Slick
Slick - avatar
+ 1
Thank you
28th May 2020, 6:36 PM
Sky
Sky - avatar
+ 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
28th May 2020, 8:08 PM
Hisham YUM 🇲🇦
Hisham YUM 🇲🇦 - avatar
0
How do you access it from the math module
28th May 2020, 6:45 PM
Sky
Sky - avatar