from abc import ABC, abstractmethod
class all(ABC):
@abstractmethod
def printarea(self):
return 0
class Rectangle(all):
type = "Rectangle"
sides = 4
def __init__(self):
self.length = 6
self.breadth = 7
def printarea(self):
return self.length*self.breadth
a = Rectangle()
print(a.printarea())
Comments
Post a Comment