Question: You need a program that will calculate the change you are due when you buy an item in a store. You need to know how

You need a program that will calculate the change you are due when you buy an item in a store. You need to know how much the item costs and how much money you gave the cashier. The program reports how many dollars, quarters, dimes, nickels and pennies that you get back.

develop python program to calculate the change (dollars, quarters, dimes, nickels and pennies) that the user gets back from the cashier

When you have the program running correctly, verify that your program

produces the same output as in the following test cases.

---

Test case 1

---

Change calculator

Enter the price of the item bought: .99

Enter the amount of money you give the cashier: 1

Your change:

dollars

0

quarters

0

dimes

0

nickels

0

pennies

1

Thank you for your business

---

Test case 2

---

Change calculator

Enter the price of the item bought: 1.57

Enter the amount of money you give the cashier: 5

Your change:

dollars 3

quarters 1

dimes 1

nickels 1

pennies 3

Thank you for your business

I believe I am supposed to use floating point expressions to help round errors also.

Could a tutor with python experience help me?

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 Programming Questions!