Question: Develop a program that classifies a given amount of money into smaller monitory units. The program lets the user enter an amount as a floating-point

Develop a program that classifies a given amount of money into smaller monitory units.  The program lets the user enter an amount as a floating-point value representing a total in dollars and cents, and then outputs a report listing the monetary equivalent in dollars, quarters, dimes, nickels and pennies, as shown in the sample run.

 

Guidelines:

             Prompt the user to enter the amount as a decimal value, such as (11.56).

             Convert the amount (11.56) into cents (1156).

             Using integer division (//), divide cents by 100 to find number of dollars.

             Using remainder (%) by 100 to obtain the remaining cents.

             Using integer division (//), divide the remaining cents by 25 to find number of quarters.

             Using remainder (%) by 25 to obtain the remaining cents.

             Using integer division (//), divide the remaining cents by 10 to find number of dimes.

             Using remainder (%) by 10 to obtain the remaining cents.

             Using integer division (//), divide the remaining cents by 5 to find number of nickels.

             Using remainder (%) by 5 to obtain the remaining cents.

             The remaining cents are the number of pennies.

 

 

Example run:

 

Enter an amount: for example, 11.56:

Your amount is 11.56 consists of:

11 dollars

2 quarters

0 dimes

1 nickel

1 penny


Step by Step Solution

3.37 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

python program def classifymoneyamount Convert the amount into cents cents intamount 100 Calculate ... View full answer

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!