I am trying again(!) to learn enough Python to be able to process a bunch of files, and have run into something I don't understand right at the beginning. I am using Python 2.5 IDLE on a WindowsXP machine, and going through examples given in a Python tutorial. My understanding is that the built-in round function is written round(variable, n) where variable is the number to be rounded and n is the desired number of digits after the decimal point. I get the following:
>>> x = -2.3
>>> x
-2.2999999999999998
>>> round (x, 2)
-2.2999999999999998
>>> round (x)
-2.0
>>> round (x, 1)
-2.2999999999999998
Does anyone have any ideas?
Thank you!