newb: Python Floating Point

johnny rampeters at gmail.com
Thu Mar 15 20:09:55 EDT 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