[Tutor] PI

memilanuk memilanuk at gmail.com
Thu May 26 06:36:35 CEST 2011


On 05/25/2011 09:21 PM, David Merrick wrote:
> How do I can access to the math module to use PI?
>
> area = math.pi * pow(3,2)
> Traceback (most recent call last):
>    File "<pyshell#16>", line 1, in <module>
>      area = math.i * pow(3,2)
> NameError: name 'math' is not defined
>

try 'import math' first...


More information about the Tutor mailing list