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:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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: 

[keithbagley@Keiths-MacBook-Pro Downloads % python3 atm.py
Welcome to PDQ Bank! How much to withdraw? $ 105
Cha-ching! You asked for $ 105
That breaks down to:
2 fifties
0 twenties
0 tens
1 fives
O ones
[keithbagley@Keiths-MacBook-Pro Downloads % python3 atm.py
Welcome to PDQ Bank! How much to withdraw? $ 237
Cha-ching! You asked for $ 237
That breaks down to:
4 fifties
1 twenties
1 tens
1 fives
2 ones
(keithbagley@Keiths-MacBook-Pro Downloads % python3 atm.py
Welcome to PDQ Bank! How much to withdraw? $ 252
Cha-ching! You asked for $ 252
That breaks down to:
5 fifties
0 twenties
0 tens
0 fives
2 ones
keithbagley@Keiths-MacBook-Pro Downloads %
Transcribed Image Text:[keithbagley@Keiths-MacBook-Pro Downloads % python3 atm.py Welcome to PDQ Bank! How much to withdraw? $ 105 Cha-ching! You asked for $ 105 That breaks down to: 2 fifties 0 twenties 0 tens 1 fives O ones [keithbagley@Keiths-MacBook-Pro Downloads % python3 atm.py Welcome to PDQ Bank! How much to withdraw? $ 237 Cha-ching! You asked for $ 237 That breaks down to: 4 fifties 1 twenties 1 tens 1 fives 2 ones (keithbagley@Keiths-MacBook-Pro Downloads % python3 atm.py Welcome to PDQ Bank! How much to withdraw? $ 252 Cha-ching! You asked for $ 252 That breaks down to: 5 fifties 0 twenties 0 tens 0 fives 2 ones keithbagley@Keiths-MacBook-Pro Downloads %
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education