Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started