+ 2
How to round up in Python
Pls assist
3 Antworten
+ 2
Lothar You are right, the linked code is wrong.
This search result is better
https://code.sololearn.com/cEho42jhEsTk/?ref=app
+ 5
Gordon , in the code from kuvam:
if one > 0.5:
print(int(num) + 1)
means that 2.5 is rounded down -> 2, and that 2.51 is rounded up -> 3 ???
I thought that 2.5 should give 3.
+ 3
Our code playground has a filter option and a search feature.
Try searching "roundup" and filter option "Python"
You should get this search result :
https://code.sololearn.com/c6G6Knuq7wmN/?ref=app