Question: Write a Python program (called q2.py) that for a given change amount, reports the maximum number of dollars followed by the number of quarters, dimes,

Write a Python program (called q2.py) that for a given change amount, reports the

maximum number of dollars followed by the number of quarters, dimes, nickels, and

pennies. Hint: You might find it easier to convert the change amount to cents and

then proceeding with your calculations.

Example #1.

Enter the change amount : 11.42

11 d o l l a r s

1 q u a r t e r s

1 dimes

1 n i c k e l s

2 pennies

Example #2.

Enter the change amount : 4.32

4 d o l l a r s

1 q u a r t e r s

0 dimes

1 n i c k e l s

2 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!