← The arcade

Christmas · difficulty 2 of 3

Presents on a budget 🛍️

For each person, buy the most expensive gift on their wish list that fits their budget. If nothing fits, they get socks. Print what everyone gets and the total spent.

This one is part of Pro. Plenty of arcade challenges are free to play right now.

Skills: dictionaries, tuples, max with a key

Open the arcade