In Python I have been trying out classes for the first time. When I use this code I get the error 'This constructed does not take arguments' on line 15. Can someone please tell me what the problem is?
class Triangle:
def _init_(self,h,b):
self.h = h
self.b = b
author = 'No one has claimed this rectangle yet'
description = 'None'
def area(self):
return (self.h * self.b)/2
def description(self,text):
self.description = text
def author(self,text):
self.author = text
fred = Triangle(4,5)
print fred.area()
__init__, and not_init_- pixis