Re: Why am I getting this Error message

2010-01-28 Thread MRAB
Ray Holt wrote: Why am I getting the following error message. Area has been declared as an attribute of Circle. Thanks, Ray class Circle: def __init__(self): self.radius = 1 def area(self): return self.radius * self.radius * 3.14159 c = Circle() c.radius = 3 print c.area()

Re: Why am I getting this Error message

2010-01-28 Thread Steve Holden
Ray Holt wrote: > Why am I getting the following error message. Area has been declared as > an attribute of Circle. Thanks, Ray > > > class Circle: > def __init__(self): > self.radius = 1 > def area(self): > return self.radius * self.radius * 3.14159 > c = Circle() > c.radius = 3 >

Re: Why am I getting this Error message

2010-01-28 Thread Chris Rebert
On Thu, Jan 28, 2010 at 11:57 AM, Ray Holt wrote: > Why am I getting the following error message. Area has been declared as an > attribute of Circle. Thanks, Ray > > class Circle: >  def __init__(self): > self.radius = 1 >  def area(self): > return self.radius * self.radius * 3.14159 >  

Why am I getting this Error message

2010-01-28 Thread Ray Holt
Why am I getting the following error message. Area has been declared as an attribute of Circle. Thanks, Ray class Circle: def __init__(self): self.radius = 1 def area(self): return self.radius * self.radius * 3.14159 c = Circle() c.radius = 3 print c.area() Traceback (most rece