Consider the software that runs in an Automated Teller Machine (ATM) machine. One task that must be able to be performed is to determine the type (denomination) of currency and the numbers of bills (aka “banknotes” for those of you not from North America) for each type dispensed. A requirement is that our ATM use the fewest number of bills that it can to dispense the specified amount of money. It only dispenses fifties, twenties, tens, fives, and ones. Design and implement program that writes out what bills would be dispensed if this machine existed for the amount of money that was asked for by the user.Test Cases In the comments at the top of your file, list 3 test cases that you came up with. Something like this but choose your own examples. You should write your test cases in such a way that, if they all pass, you can be fairly confident your program will work all the time. ''' Test case #1: Input: $1 Output: 0 fifties, 0 twenties, 0 tens, 0 fives, 1 ones Test case #2: Input: $22 Output: 0 fifties, 1 twenties, 0 tens, 0 fives, 2 ones ''' Sample Output in the photo attached:
Consider the software that runs in an Automated Teller Machine (ATM) machine. One task that must be able to be performed is to determine the type (denomination) of currency and the numbers of bills (aka “banknotes” for those of you not from North America) for each type dispensed. A requirement is that our ATM use the fewest number of bills that it can to dispense the specified amount of money. It only dispenses fifties, twenties, tens, fives, and ones.
Design and implement
In the comments at the top of your file, list 3 test cases that you came up with. Something like this but choose your own examples. You should write your test cases in such a way that, if they all pass, you can be fairly confident your program will work all the time.
'''
Test case #1:
Input: $1
Output: 0 fifties, 0 twenties, 0 tens, 0 fives, 1 ones
Test case #2:
Input: $22
Output: 0 fifties, 1 twenties, 0 tens, 0 fives, 2 ones
'''
Sample Output in the photo attached:
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images