Budgets (Expense Tracker)

Add budget <category <amount (budget <category <amount). When an add pushes a category over its budget for that month (it was within before), print over budget: <category <spent/<budget in <YYYY-MM right after the added line. status <YYYY-MM prints one line per budget in name order: <category <spent/<budget left <amount or over by <amount.

Input: As before.

Output: As before.

Difficulty: Medium. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.

Hint

  • Warn only on the add that crosses the line, not on every add after.

More Expense Tracker practice