Question: Step 1 Write a python program that counts the number and value of coins in your 'pocket.' 1. Prompt the user for the number of

Step 1

Write a python program that counts the number and value of coins in your 'pocket.'

1. Prompt the user for the number of each type of coin.

2. Calculate the value of each kind of coin and then the value of all the coins in the collection.

The output of your program should resemble:

The total value of your change is $3.72 with $2.75 in quarters, $0.60 in dimes, $0.30 in nickels, and $0.07 in pennies.

Step 2

1. Write a modification of your program so that it calculates the change that should be returned in a transaction.

2. Take as input, the cost of the item(s), the amount received in payment and the change that needs to be given.

The output might resemble this: Thank you for your purchase.

Your total cost is $23.32, you gave us $30.00. We are returning $6.68: $6.00 in bills, $0.50 with 2 quarters, $0.10 with 1 dimes, $0.05 with 1 nickels and $0.03 with 3 pennies.

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!