A graphic design software company is developing their next-gen software. They are implementing a feature to calculate the area of various shapes. They have started by creating a generic Shape class, but they need to extend it with two more specific classes: Circle and Rectangle. Your task is to implement this feature.
Start by creating a base class Shape with a method area() that returns 0. This method should be overridden in two derived classes: Circle and Rectangle. Both Circle and Rectangle should inherit from the Shape class and both should have an area() method that calculates and returns the area of the respective shape.
The Circle class should be initialized with a radius, r. The area() method of the Circle class should return the area calculated as .
The Rectangle class should be initialized with a length, l, and a width, w. The area() method of the Rectangle class should return the area calculated as.
circle = Circle(5); print(circle.area()); rect = Rectangle(5, 10); print(rect.area())