+ 2
Which function rounds off to the nearest whole number not decimal.
python 3 round to the nearest whole number. e.g from 1060 to 1000 from 1600 to 2000 from 120 to 100 in python. the round () is tricking me up.
2 Antworten
+ 4
Jarvis2030🇰🇪 1100, 1000, 1600, 2000 all are whole numbers.
If you want a floating point number to be rounded off, then round() is the best option.
+ 3
round doesn't round off, it rounds up or down, depending.
You should use floor from math instead.