"""A base class for shapes.""" class Shape: """A closed geometric shape has an area and a perimeter.""" def area(self) -> int | float: """ Get the area of this shape. :return: the area of this shape """ raise NotImplementedError # must be implemented by subclasses def perimeter(self) -> int | float: """ Get the perimeter of this shape. :return: the perimeter of this shape """ raise NotImplementedError # must be implemented by subclasses