[BangPypers] Need Help : Setting Floating Precision Point as 2 in Python

Arulalan T arulalant at gmail.com
Tue Aug 24 13:20:47 CEST 2010


2010/8/24 Pradip Caulagi <caulagi at gmail.com>

> On Tue, Aug 24, 2010 at 4:05 PM, Arulalan T <arulalant at gmail.com> wrote:
> >
> > In python, I need to set the floating point precision as 2.
> >
> > I am getting the following output in python while adding two float nos.
> >
> >>>>a=79.73
> >>>>b=0.5
>
> Multiply by 100.
> Add as integers.
> Divide by 100.
>


Yes, we can do this way.
By this way I can handle 80 and 23 as two separate integers.
But when I want make it as float
>>>80+0.23
 80.230000000000004

again it will be come same floating value.
so I cant use this way.


-- 
Regards,
Arulalan.T

Kanchi Linux User Group Rocks !
http://kanchilug.wordpress.com

My Experiments In Linux are here
http://tuxcoder.wordpress.com


More information about the BangPypers mailing list