(python) Create a program that “makes change” for the user. The user will input two numbers, one is the amount charged and the other is the amount given. The program will determine the amount of change returned based on our currency.  It should return the bills (if any) and the coins. Example: Charged $2.35 and paid with $3.00 Returned $0.65 2 quarters ($0.25) 1 dime ($0.10) 1 nickel ($0.05)

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

(python)

Create a program that “makes change” for the user. The user will input two numbers, one is the amount charged and the other is the amount given. The program will determine the amount of change returned based on our currency.  It should return the bills (if any) and the coins.

Example:

Charged $2.35 and paid with $3.00

Returned $0.65

2 quarters ($0.25)

1 dime ($0.10)

1 nickel ($0.05)

 

NOTE: To make this a little easier, we will assume you never charge more than $20 and pay more than $20.

Requirements

  1. First task is not directly writing code. Create the Pseudo-code to solve this problem. This is a combination of code and english used to solve the problem before actually writing code. This can be used as the comments for your program.
  2. Include a comment to the top of the Python code.  The comment must include the following:
  1. Your name
  2. Course name and project name
  3. Date completed
  1. The program accepts two numbers, both floats. These values should be stored in appropriately named variables.
  2. Calculate and display the amount of change that should be returned.
  3. Display the bills and change returned to the customer.
  1. Bonus: Only display the bills or change returned
  2. Bonus: If no change, display a message saying that.
  3. Bonus: If payment is less than charge, display a message informing the customer they didn’t provide enough money.
  1. All output should use appropriate currency format (See Example above).
  2. Make sure that your program contains meaningful comments.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions
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