Answers for "round float to 0, .5 or 1"

21

how to round a float in python

round(number, ndigits)
Posted by: Guest on April-12-2020
1

why does python round 0.5 to 0

i = round(0.5)
print(i)
Posted by: Guest on July-28-2021

Python Answers by Framework

Browse Popular Code Answers by Language