Question: Pyhton : Write a program called dollarsAndPennies what it does: 1 . ask the user for an amount of money specified in dollars and cents.
Pyhton :
Write a program called dollarsAndPennies
what it does:
ask the user for an amount of money specified in dollars and
cents. For example, the user might enter:
your program must output maximum number of dollar bills that
fit in the amount, then the maximum number of fifty dollar bills,
then then and After that, display maximum number of
quarters, number of dimes, nickels and pennies.
For example $ could be displayed as pennies, or fifty
dollar bills or twenty dollar bills. But the correct answer is
the maximum number of dollar bills first: one hundred
dollar bill. Look at the examples.
HINT: remember: in python is integer division. so:
is
also computes the remainder, so:
is
Examples:
python dollarsAndPennies.py
enter amount:
total:
dollar bills
dollar bills
dollar bills
dollar bills
dollar bills
dollar bills
cent coins
cent coins
cent coins
cent coins
python dollarsAndPennies.py
enter amount:
total:
dollar bills
dollar bills
dollar bills
dollar bills
dollar bills
dollar bills
cent coins
cent coins
cent coins
cent coins
python dollarsAndPennies.py
enter amount:
total:
dollar bills
dollar bills
dollar bills
dollar bills
dollar bills
dollar bills
cent coins
cent coins
cent coins
cent coins
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
