Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q2: # Named constants RETAIL_PRICE = 99 # Local variables quantity = 0 fullPrice = 0.0 discountRate = 0.0 discountAmount = 0.0 totalAmount = 0.0
Q2: # Named constants
RETAIL_PRICE = 99
# Local variables
quantity = 0
fullPrice = 0.0
discountRate = 0.0
discountAmount = 0.0
totalAmount = 0.0
# Calculate the discount rate
if quantity > 97 then discountRate = 0.40
if quantity > 47 then discountRate = 0.30
if quantity > 17 then discountRate = 0.20
if quantity > 7 then discountRate = 0.10
else
discountRate = 0
# Calculate the full price
quantity * RETAIL_PRICE
# Calculate the discount amount
# Calculate the total amount
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