Thanks Shantanoo, finally got the hang of this. 2010/10/11 शंतनू (Shantanoo) <shanta...@gmail.com>
> === > round(...) > round(number[, ndigits]) -> floating point number > > Round a number to a given precision in decimal digits (default 0 > digits). > This always returns a floating point number. Precision may be > negative. > === > > >>> round(1.23423,2) > 1.23 > >>> round(1.23623,2) > 1.24 > > > HTH. > > On Mon, Oct 11, 2010 at 13:51, Sithembewena Lloyd Dube > <zebr...@gmail.com>wrote: > >> Thanks everyone. >> >> >> On Fri, Oct 8, 2010 at 11:44 PM, Wayne Werner <waynejwer...@gmail.com>wrote: >> >>> On Fri, Oct 8, 2010 at 7:58 AM, Sithembewena Lloyd Dube < >>> zebr...@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 >> >> _______________________________________________ >> Tutor maillist - Tutor@python.org >> To unsubscribe or change subscription options: >> http://mail.python.org/mailman/listinfo/tutor >> >> > -- Regards, Sithembewena Lloyd Dube http://www.lloyddube.com
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor