Question
IN PYTHON: A shopkeeper in Diagon Alley needs you to write a program that will calculate the correct amount of change due to a customer.
IN PYTHON: A shopkeeper in Diagon Alley needs you to write a program that will calculate the
correct amount of change due to a customer. (In Diagon Alley they use three coins with
different values, given below).
1.
Prompt the user to input the amount of sale in Galleons, Sickles, and Knuts.
2.
Prompt the user to input the amount of money given by the customer in Galleons,
Sickles, and Knuts.
3.
Use the following conversions
:
a.
1 Galleon = 17 Sickles
b.
1 Sickle = 29 Knuts
4.
Perform the necessary calculations and conversions
using the arithmetic operators
(not ifs or loops) to compute the correct change in the least number of coins.
5.
Create a formatted receipt recording the entire transaction
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started