These exercises are live pyodide cells. Edit the code and run it directly in the browser for immediate business insights.Exercises¶
Exercise 1¶
Given a dict of product->sales, write market_share(sales) that returns percentages per product.
Exercise 2¶
Write average_order_value(orders) where orders is list of totals; return average or 0 if none.
Exercise 3¶
Create high_value_customers(customers, threshold) that filters customers with lifetime value > threshold.