from abc import ABC,abstractmethod

from math import sqrt

class Polygon(ABC):

@abstractmethod

def sides(self):

pass

@abstractmethod

def area(self):

pass

@abstractmethod

def perimeter(self):

pass

```
def figure(self):
return("its a 2d figure")
```

class Rec(Polygon):

```
def sides(self,x,y):
self.x=x
self.y=y
def area(self):
return self.x*self.y
def perimeter(self):
return 2*(self.x+self.y)
def extrameth(self):
return("its a 4 sided but longer")
```

class square(Polygon):

def sides(self,a):

self.a=a

```
def area(self):
return self.a*self.a
def perimeter(self):
return 4*(self.a)
def extrameth(self):
return ("its a 4sided ")
```

obj1=Rec()

obj1.sides(2,6)

obj2=square()

obj2.sides(6)

for o in [Rec,square]:

print(o.area())

print(o.perimeter())

print(o.extrameth())

print(o.figure())

pls some one help with this code

its giving TypeError: area() missing 1 required positional argument: ‘self’