Machines · difficulty 2 of 3
Till change maker 🪙
Work in pence to avoid float errors. Given the price and the cash handed over, print the coins returned (UK coins: 200, 100, 50, 20, 10, 5, 2, 1) as a dictionary of coin to count, only including coins used.
This one is part of Pro. Plenty of arcade challenges are free to play right now.
Skills: dicts, if/else, loops