Question: Suppose a cashier asks you to write a function that calculates the minimum number of coins he/she needs for reimbursing the remaining balance of the

  1. Suppose a cashier asks you to write a function that calculates the minimum number of coins he/she needs for reimbursing the remaining balance of the customer. For example, the cashier needs to payback $27.65 to the customer, and he/she can only use quarter, Dime, and penny. What combination of these coins should he/she use to minimize the number of coins?
  2. Consider the previous example but assume that the number of available coins is also known and limited. For example, there are only 20 Dimes left. The number of available coins must also be passed into the function as a parameter

This is to be done in Python

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!