Design an algorithm and implement a corresponding Python program that can make “change”. Your
program should take two numbers as input, one that is a monetary amount charged for any item
purchased, and the other that is a monetary amount given. It should then return the number of each
kind of bill(note) and coin to give back as change for the difference between the amount given and
the amount charged. The values assigned to the bills and coins can be based on the monetary
system of any current or former government.
Perform the following:
1. Try to design your program so that it returns as few bills(notes) and coins as possible.
2. Implement a Python Program to output as few coins as possible.
3. Design an adequate set of test cases and compile test results in a table.
Answers
Answer:
ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ{\__/}
(•‿•)
>❤️Mᴇʟᴀɴɪᴇ Mᴀʀᴛɪᴇɴᴇᴢ- Dᴇᴛᴇɴᴛɪᴏɴ
0:35 ━❍──────── -5:32
↻ ⊲ Ⅱ ⊳ ↺
VOLUME: ▁▂▃▄▅▆▇ 100%
Explanation:
Design an algorithm and implement a corresponding Python program that can make “change”. Your
program should take two numbers as input, one that is a monetary amount charged for any item
purchased, and the other that is a monetary amount given. It should then return the number of each
kind of bill (note) and coin to give back as change for the difference between the amount given and
the amount charged. The values assigned to the bills and coins can be based on the monetary
system of any current or former government.