On Fri, Dec 3, 2010 at 1:52 PM, Christopher Spears
<[email protected]> wrote:
>>>> float_a = 1.16667
>
> However, I want to pass the value of float_a to float_b, but I want the float 
> to be accurate to two decimal points.

Use the built-in round() function, like this:

>>> a = 1.16667
>>> print a
1.16667
>>> b = round(a, 2)
>>> print b
1.17


-- 
Jerry
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to