Why wise? Technical part was OOP
Implement an extensible object-oriented shape area calculator. Create shape classes with a common area() method, instantiate them from input dictionaries, and return areas in input order.
Input: a list of dictionaries describing circle shapes with radius, or rectangle shapes with width and height.
Output: a list of numeric areas. Use 3.141592653589793 for π.
Example: [{"type":"circle","radius":2},{"type":"rectangle","width":3,"height":4}] returns [12.566370614359172, 12].
Constraints: at least one shape, at most 10^4 shapes, and all dimensions are positive.
def calculate_areas(shapes):