Write a program that asks the user to enter an amount of money in the format of dollars and remaining cents. The program should calculate and print the minimum number of coins (quarters, dimes, nickels and pennies) that are equivalent to the given amount. Hint: In order to find the minimum number of coins, first find the maximum number of quarters that fit in the given amount of money, then find the maximum number of dimes that fit in the remaining amount, and so on. File Name coins.py Score There are five tests each worth 2 points For example, an execution should look like this: Please enter the amount of money to convert: # of dollars: 2 # of cents: 37 The coins are 9 quarters, 1 dimes, 0 nickels and 2 pennies these program might be in python
Write a
Hint: In order to find the minimum number of coins, first find the maximum number of quarters that fit in the given amount of money, then find the maximum number of dimes that fit in the remaining amount, and so on.
File Name
coins.py
Score
There are five tests each worth 2 points
For example, an execution should look like this:
Please enter the amount of money to convert:
# of dollars: 2
# of cents: 37
The coins are 9 quarters, 1 dimes, 0 nickels and 2 pennies
these program might be in python
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images