Jordan B.

asked • 09/18/17

Using Python to find change

So I have 10 quarters, 10 dimes, 10 nickels, and 10 pennies. I need to create a code that will determine if that money can purchase an object at a certain price (the price is the input of the code) and if it can't then it displays an error message. If the price is input, then it will prompt for dollars in payment and print the change due using the minimum number of coins possible (using the Greedy Algorithm). Before prompting for price, it will display all of the coins remaining in the stock.

I'm really confused on how to go about this and could use a bit of help.

1 Expert Answer

By:

Andy C. answered • 09/18/17

Tutor
4.9 (27)

Math/Physics Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.