newb: Python Floating Point

johnny rampeters at gmail.com
Fri Mar 16 01:09:55 CET 2007


When I do the following, rounding to 2 decimal places doesn't seem to
work.  I should get 0.99 :

>>> a =0.99
>>> a
0.98999999999999999
>>> round(a,2)
0.98999999999999999
>>>

thank you.




More information about the Python-list mailing list