# breaking it down medium

The Allowance Ledger

You're saving for something GREAT, funded entirely by chores. 💰

You get each chore's rates (coins per time done), how many times you did each (matching lists), and the goal price. Print pay <this week's coins> then weeks <whole weeks needed at that pay to reach the goal> (round up!).

Example:

Input: rates = [3, 5, 2], times = [2, 1, 4], goal = 38 Output:

pay 19
weeks 2

This week's pay is 3×2 + 5×1 + 2×4 = 6 + 5 + 8 = 19. Reaching 38 at 19 a week takes 2 weeks (38 ÷ 19 = 2 exactly).

💡 need a hint?

brk-allowance-ledger.py🔒 given lines are locked — write your code in between
loading...