+ 4
Why does 3.5 on round off gets to 4 but 4.5 doesn't round to 5 ?
3 Antworten
+ 7
Python rounds up/down to the nearest even integer.
round(3.5, 0) = 4.0
round(4.5, 0) = 4.0
+ 3
Try to round 3.51 and 4.51 😎 In mathematic, float number are round to upper if reminder equal to 5, but in Python, float number are rounded to nearest integer 😎 In other word, if you enter 3.5, float number are round to 4 and second example: 4.5 are round to 4. P.S. Try to catch reminder...
+ 1
*confused screaming*