Question: Solve in python Problem 3. Computing Change (includes 10 extra credit points) Write a program p3.py that computes the equivalent of a dollar amount in

Solve in python

Solve in python Problem 3. Computing Change (includes 10 extra credit points)

Problem 3. Computing Change (includes 10 extra credit points) Write a program p3.py that computes the equivalent of a dollar amount in change using quarters, dimes, and pennies. No nickels are used for conversion. The program reads from the terminal the dollar amount in a loop while not end-of-file. Inside the loop it computes how many quarters, dimes, and pennies make up the original dollar amount and then displays the change. The program should terminate if the user types an invalid string Here is a sample user session, with input highlighted in yellow: Enter amount: 10 $10 makes 40 quarters, ? dimes, and ? pennies (40 coins), total amount n coins: $10 Enter amount: ?.24 $0.24 makes ? quarters, 2 dimes, and 4 pennies (6 coins), total amount in coins: $0.24 Enter amount: se makes ? quarters , ? dimes, and ? pennies (? coins), total amount in coins : $? Enter amount: 99.99 $99.99 makes 399 quarters, 2 dimes, and 4 pennies (405 coins), total amount in coins: $99.99 Enter amount: 3.45 $3.45 makes 13 quarters, 2 dimes, and ? pennies (15 coins), total amount in coins : $3.45 Enter amount: 5.25 $5.25 makes 21 quarters, ? dimes, and ? pennies (21 coins), total amount in coins : $5.25 10.12 Invalid input. (user types CTRL-Z on Windows to enter EOF and finish the program)

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!