Rectangle(w, h) and Circle(r), each with its own area(). Then write the plain function total_area(shapes) that sums area() over a mixed list without any isinstance checks — polymorphism means the loop never asks what it is holding. Use math.pi and round the total to 2 decimals.total_area([Rectangle(2, 3), Circle(1)])
9.14
6 + π rounds to 9.14.
Each class owns its formula.
sum(s.area() for s in shapes).