[Tutor] rounding to the nearest 0.5
Eric Brunson
brunson at brunson.com
Thu Oct 25 22:20:28 CEST 2007
Bryan Fodness wrote:
>
> Is there a built-in function that will round to the nearest 0.5?
Not that I know of, but "round( 2 * n ) / 2" will give you what you're
looking for.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list