Mastery check
Combination Rep~5 min

Write: apply price changes

menu is a dict mapping item names to prices. changes is a dict mapping item names to new prices.

Write reprice(menu, changes) that returns a new dict: the menu with each change applied. Ignore changes for items that are not on the menu. Do not modify menu itself.

reprice({'tea': 4, 'cake': 5}, {'tea': 3, 'pie': 6}) → {'tea': 3, 'cake': 5}

No labels here: choosing the approach is part of what this tests. The skills it trains show once you pass.

main.pypracticePython