+ 1
Pls, how do you approximate using numbers
66.66667 to 67
11 Réponses
+ 9
Abdulazeez ,
your code uses int() to do the rounding. this is *rounding down*. we have to *round up* (see the task description!).
> there is a function in math module that can achieve this: ceil()
+ 7
Have a close look at the output format: You are supposed to round ***up*** to the nearest whole number.
+ 6
Abdulazeez ,
sorry, my post is not explicitly saying that we have to *import* the ceil() function. put this line at the top of your code:
from math import ceil
...
+ 5
It is called rounding. If you need help with your code, link your code and describe what it is supposed to do
+ 4
you need to import the function from the math module
+ 2
https://code.sololearn.com/cI34M6ymKLLv/?ref=app
+ 2
Use ciel() for +roundup and for -roundup use floor()
eg.
ciel() = 6.6666 = 7
floor() = 6.6666 = 6
+ 2
To approximate 66.66667 to the nearest whole number, you can round it. In this case, 66.66667 is closest to 67. So, you can say that 66.66667 is approximately equal to 67.
+ 2
Thanks
0
The ceil()
Function is not working