Hello, I'm currently working on a lab for class but I'm really stuck with the below lab that I cannot seem to figure out. If anyone can walk me through how to code the below I would really apprecaite the help! Description 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
Hello,
I'm currently working on a lab for class but I'm really stuck with the below lab that I cannot seem to figure out. If anyone can walk me through how to code the below I would really apprecaite the help!
Description
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
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images