[Tutor] Rounding a Python float to the nearest half integer

Sithembewena Lloyd Dube zebra05 at gmail.com
Mon Oct 11 10:21:32 CEST 2010


Thanks everyone.

On Fri, Oct 8, 2010 at 11:44 PM, Wayne Werner <waynejwerner at gmail.com>wrote:

> 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
>



-- 
Regards,
Sithembewena Lloyd Dube
http://www.lloyddube.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101011/fd656c90/attachment.html>


More information about the Tutor mailing list