Write a program that begins by reading a number of cents from the users as an integer (this is input from the user).Your program should then compute and display the denominations of the coins that should be used to give that amount of change to a shopper in coin denominations (Assume that the change machine is loaded with pennies, nickels, dimes, quarters, loonies and toonies).The change should be given using as few coins as possible. For example : you input 455 cents, it tells you that you have:2 Toonies2 quarters1 nickleREMEMBER : you need to work with remainders and floor division

Question
Asked Oct 10, 2019
Write a program that begins by reading a number of cents from the users as an integer (this is input from the user).
Your program should then compute and display the denominations of the coins that should be used to give that amount of change to a shopper in coin denominations (Assume that the change machine is loaded with pennies, nickels, dimes, quarters, loonies and toonies).
The change should be given using as few coins as possible. 
For example : you input 455 cents, it tells you that you have:
  • 2 Toonies
  • 2 quarters
  • 1 nickle
REMEMBER : you need to work with remainders and floor division
check_circleExpert Solution
Step 1
  • Initialize all required currency named variable with 0 in python3 programming language so that the use of floor division becomes easier in this programming language.
  • Create an if case in which all currency will be checked with entered currency (which is in cent), and if the case is true the entered numb...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour*

See Solution
*Response times may vary by subject and question
Tagged in

Engineering

Computer Science

Python

Related Computer Science Q&A

Find answers to questions asked by student like you

Show more Q&A add
question_answer

Q: 3prep Write a Python program for an online MoonBucks coffee order. Coffee is sold by the pound, and ...

A: Program AlgorithmDeclare the required variables and take the input from the user for the pound’s use...

question_answer

Q: Explain how to convert the letters A, B and C to decimal.

A: Decimal Number SystemDecimal number system is a base- 10 number system. It has 10 symbols, the symbo...

question_answer

Q: Beacon frames in the frequency hopping spread spectrum variant of 802.11 contain the dwell time. Do ...

A: NO,  as we know the Bluetooth frame has dwell time of 625p sec for basic data rate in the frame its ...

question_answer

Q: OF 2019 x + X PG Difference between two given ti https://moodle.oakland.edu/plug X fn Course: CSI-14...

A: Program in C to calculate the order price by entering number of books, price of a book, tax per book...

question_answer

Q: How to use if else statement

A: If-else statement is used when a particular block of code is to be executed when a certain condition...

question_answer

Q: Consider the following information about a university database: Professors have an SSN, a name, an ...

A: Below is the ER Diagram based on the information given in the question about the university.

question_answer

Q: What are the risks associated with a pervasive security infrastructure? What are the reasons for NOT...

A: Pervasive security infrastructure refers to cloud security risks. As many users possibly from differ...

question_answer

Q: Do research to identify a company that has gone beyond e-commerce to use information systems and net...

A: One of the companies that have achieved great success in e-business or e-commerce is Amazon. It is k...

question_answer

Q: Compare and contrast cache and virtual memory and give an example scenario where each can be applied...

A: Cache memory:-It is the memory, which is very nearest to the CPU, all recent instruction is stored i...