Practice ยท 3 of 3
Acceptance: finance_summary
Contract: finance_summary(expenses, budget) returns {"total", "count", "top", "remaining", "warning"} where total is rounded, top is the category with the highest total (tie -> first to reach it; None when empty), remaining = round(budget - total, 2), and warning is True when total > 0.9 * budget else False.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Capstone: Core Contract