Flow controls: Loops · 13 / 26 Exercise Medium

Return change

Objective

Create a Python program that simulates a supermarket cash register to return change for a purchase. Request the total amount of money you have in the cash register (x) and the purchase value (y) as an integer.

You should use bills of 100, 50, 20, 10, 5, 2, or 1 to return the change, starting with the highest value bills.

Input
100
1
Output
50 20 20 5 2 2

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise