The Best Seller Report
Challenge on lesson: Checkpoint: Problem Solving
CHALLENGE
Difficulty: beginner+25 XP
sales = [("mon", "pen", 4), ("mon", "book", 2), ("tue", "pen", 3), ("wed", "bag", 5), ("wed", "book", 7)] โ tuples of (day, item, qty). Write report(sales) returning a dict with keys: "total" (all units sold), "best_item" (item with the highest total units; ties -> the one that REACHED its total first), and "busiest_day" (day with the most units; ties -> alphabetically first).
Press Submit to check your solution.
Back to lesson: Checkpoint: Problem Solving