[Tutor] Rounding a Python float to the nearest half integer
Wayne Werner
waynejwerner at gmail.com
Fri Oct 8 23:44:46 CEST 2010
On Fri, Oct 8, 2010 at 7:58 AM, Sithembewena Lloyd Dube
<zebra05 at gmail.com>wrote:
> I realise that one cannot have a half integer :) I meant how would one
> round off to the first decimal nearest to either 0.5, or a whole number.
>
> Ugh...does anyone get what I'm trying to articulate? :)
sample input/output cases are always useful.
-Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101008/a18480cb/attachment.html>
More information about the Tutor
mailing list