Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
see the comments below. this solution was written in Pyrthon 2. Python 3 changed the
round()
function for halfway cases: it used to be half away from zero (0.5 --> 1
,1.5 --> 2
), now it's half towards the nearest even integer (the so-called "banker's rounding"): (0.5 --> 0
,1.5 --> 2
)How come when I did it it was incorrect????
Which verion did you do?
This doesn't work in Python 3, round() has been changed for worse for some reason.
This solution requires Python 2.7. The rounding behavior changed from always rounding up at the half to bankers rounding in python 3.
Doesn't work for 4.25
For some reason round() rounds down for 8.5 but for all other x.5 numbers it rounds up. Tried in multiple editors. Bug in python?
it took me a few sec to realise how it works, not i see its genious !
LOL! nice one
amazing
A clever and skillfull way.Very Good~!