[Tutor] rounding

Alan Gauld alan.gauld at freenet.co.uk
Sun Jan 30 23:37:59 CET 2005


> The round function will do what you want though not quite what you
say you want :-)
>
>   >>> round(15., -1)
> 20.0

Interesting, I didn't remember the second parameter to round...
let alone the fact it could be negative!!

Batteries included once again!

Alan G.



More information about the Tutor mailing list