practicepython.in
python exercises
171 exercises

Daily #5 · 3 October 2026

Rounding halves Medium

What does this print?

print(round(2.5), round(3.5))
  1. A2 4
  2. B3 3
  3. C3 4
  4. D2 3
Show the answer

A: 2 4

Why: Python rounds exact halves to the nearest even number, so 2.5 goes down and 3.5 goes up. It is called banker’s rounding, and it stops a long column of rounded halves drifting upwards.

Play today’s puzzle →