Explain Python OOP concepts: init, dunder methods, abstraction, and inheritance
Asked in the Skill/Technical Round stage. Python fundamentals.
Implement an abstract Shape base class and Rectangle and Circle subclasses. Use __init__ for initialization, abstract methods for area() and perimeter(), and dunder methods for readable string output and equality. Implement shape_summary(specs), where each specification is a dictionary with type and args, and return one summary dictionary per shape.
specs is a list of dictionaries. Return dictionaries containing text, rounded area, rounded perimeter, and same_as_previous.
rectangle or circle.def shape_summary(specs):