avatar Bite 117. Round a number even (a.k.a. banker's rounding)

Bankers Rounding is an algorithm for rounding quantities to integers, in which numbers which are equidistant from the two nearest integers are rounded to the nearest even integer. Thus, 0.5 rounds down to 0; 1.5 rounds up to 2. - source

Complete the function below that takes an float, returning it rounded even.

Login and get coding
go back Beginner level
Bitecoin 2X

258 out of 259 users completed this Bite.
Will you be Pythonista #259 to crack this Bite?
Resolution time: ~26 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 2.2 on a 1-10 difficulty scale.
» You can do it! 😌

We use Python 3.8