[Tutor] Help with pi and the math module.

Pujo Aji ajikoe at gmail.com
Sat Sep 24 10:48:23 CEST 2005


hi,
 if you use : import math
you can type: diameter * math.pi
 if you use from math import *
you can type: diameter * pi
 Cheers,
pujo

 On 9/24/05, Nathan Pinno <falcon3166 at hotmail.com> wrote:
>
> Hi all,
>  I need help with pi and the math module. I had import math at the top of
> a program, but when it came to diameter*pi, it said that pi was not defined.
>  How do I use it correctly?
>  Thanks,
> Nathan Pinno
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050924/a788583b/attachment.htm


More information about the Tutor mailing list