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()
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
>
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 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