Problem 6 (20 points)
The make_change program, which determines if it's possible to make change for an
amount given coin values, in problem 4 can be defined like this.
def make_change(coins, amount):
if amount==0:
return True
for c in coins:
if amount >= c:
yes = make_change(coins, amount-c)
if yes:
return True
return False
Redefine/reimplement this program so that it returns an actual solution, in addition to
True/False.
Sample inputs and outputs:
• Input: coins=[3,7], amount=17. Output: True, [3, 7, 7].
• Input: coins=[3,7,9], amount=9. Output: True, [3, 3, 3]. Explanation: even if there's more
than one ways to make change, you only need to return one of them.
• Input: coins=[3,7], amount=8. Output: False, [].