Question: Write a program that prompts the user to enter only the dollar amount (no cents) of an item less than or equal to 100 dollars.
Write a program that prompts the user to enter only the dollar amount (no cents) of an item less than or equal to 100 dollars. Assume the customer is paying with a 100 dollar bill. Store that amount in a properly named constant as an integer. Assume that no tax and no other fees are being applied. The program should give change with the largest bills possible, starting with 50’s, 20's, then 10's then 5's, then finally ones. Review the Python math operators on page 54 and use f_string printing. Ensure that your program's output is formatted as identified in the example output below.
Example Output Enter the cost in dollars: 34 Bills dispensed as change: $20 - 0 $10 - 1 $5 $1 - 1 - 1
Step by Step Solution
3.48 Rating (151 Votes )
There are 3 Steps involved in it
Here is a Python program that implements the described functionality Constants ONEHUNDREDDOLLARS 100 ... View full answer
Get step-by-step solutions from verified subject matter experts
