Question: Program # 1 : Change Program: dollars and cents ( 6 0 pts ) - Create a Python program named test 2 - 1

Program \#1: Change Program: dollars and cents (60 pts)
- Create a Python program named test2-1.py
- This program will allow a user to enter any dollar and cents amount and then will provide change.
- Add a Conditional statement to make sure they did not enter \(\mathbf{\$ 0.00}\), if they do, then display a message saying, "You must enter an amount greater than \(\mathbf{\$ 0.00"}\) and let them enter the amount again.
- Your program must use at least one user-defined function to make the calculations. And you can use the math for the built-in function math.floor() to separate dollars from cents
- The program must allow the user to enter the dollar and cents as one input (variable)- not two different inputs.
Here are some sample runs of the program:
Please enter the amount to make change for: \$ 42.88
Number of hundreds:...... 0
Number of 50s :..........0
Number of 20s:...........2
Number of tens:.......... 0
Number of fives:......... 0
Number of singles:.......2
Number of quarters:....... 3
Number of dimes:.......... 1
Number of nickels:........ 0
Number of pennies:........ 4
Please enter the amount to make change for: \$1100.22
Number of hundreds:...... 11
Number of 50s :..........0
Number of 20s:...........0
Number of tens:.......... 0
Number of fives:......... 0
Number of singles:.......0
Number of quarters:....... 0
Number of dimes:.......... 2
Number of nickels:........ 0
Number of pennies:........ 3
Program \ # 1 : Change Program: dollars and cents

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!