value of pi and 22/7

Ian Kelly ian.g.kelly at gmail.com
Thu Mar 17 12:57:47 EDT 2011


On Thu, Mar 17, 2011 at 10:46 AM, kracekumar ramaraju
<kracethekingmaker at gmail.com> wrote:
> I tried the following
>>>> 22/7.0
> 3.1428571428571428
>>>> import math
>>>> math.pi
> 3.1415926535897931
>>>>
>
>
> Why is the difference is so much ?is pi =22/7 or something ?

Pi is not 22/7.  That is just a commonly-used approximation.



More information about the Python-list mailing list