0
What's the easiest way on how to approximate a decimal number to the nearest integer in Python.
I tried using Ceil and Floor functions from the Math module which seem to work in some cases thus finding the best flawless way to accomplish the task.
2 Réponses
+ 5
I like Numpy, there is probably a better way, but this is an easy way
https://code.sololearn.com/cXr6Putl688g/?ref=app
0
number = 3.14
print(round (number) ) ?