Re: [Tutor] calculate area of a circle

2009-04-15 Thread Oxymoron
Hi, On Wed, Apr 15, 2009 at 6:52 PM, mbikinyi brat wrote: > Hi All, > This is a code I have written to calculate the area of a circle. > def area(radius): >  temp=math.pi*radius**2 >  return temp > > I now call it by entering area(12) at the prompt in IDLE. This is the error > message I get. Can

Re: [Tutor] calculate area of a circle

2009-04-15 Thread vishwajeet singh
you need import math On Wed, Apr 15, 2009 at 2:22 PM, mbikinyi brat wrote: > Hi All, > This is a code I have written to calculate the area of a circle. > *def area(radius): > temp=math.pi*radius**2 > return temp* > ** > *I* now call it by entering *area(12)* at the prompt in IDLE. This is the >

[Tutor] calculate area of a circle

2009-04-15 Thread mbikinyi brat
Hi All, This is a code I have written to calculate the area of a circle. def area(radius):  temp=math.pi*radius**2  return temp   I now call it by entering area(12) at the prompt in IDLE. This is the error message I get. Can someone help please? Traceback (most recent call last):   File "", line