If I tell Python v. 3.4.3, round(2.5)
, then it outputs 2
. If I tell it round(1.5)
then it outputs 2 as well, though. Similarly, round(3.5)
gives 4
, while round(4.5)
gives 4
as well. I need Python to round with consistency, though. Specifically, it needs to round anytime I input a number halfway between two integers. So round(1.5) = 1
and round(2.5) = 2
, while round(1.6) = 2
and such, as usual.
How can I resolve this?
EDIT: I've already read the documentation for the round
function and understand that this is its intended behavior. My question is, how can I alter this behavior, because for my purposes I need 1.5 round down.