Practice ยท 1 of 4
Transform: Orders to Report
orders = [("coffee", 2, 3.5), ("tea", 1, 2.0), ("coffee", 3, 3.5)] (item, qty, unit_price). Write revenue_by_item(orders) returning a dict item -> total revenue, rounded to 2 decimals per item.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Transformation & AI Critique