Question
The Last Stop Boutique is having a five-day sale. Each day, starting on Monday, the price will drop 10% of the previous days price. For
The Last Stop Boutique is having a five-day sale. Each day, starting on Monday, the price will drop 10% of the previous day’s price. For example, if the original price of a product is $20.00, the sale price on Monday would be $18.00 (10% less than the original price). On Tuesday the sale price would be $16.20 (10% less than Monday). On Wednesday the sale price would be $14.58; on Thursday the sale price would be $13.12; and on Friday the sale price would be $11.81. Develop a solution that will calculate the price of an item for each of the five days, given the original price. Test the solution for an item costing $10.00.
item's price at the start of each day together with the identifying day. Assume the item is a pair of sunglasses...Test your Python program with an initial price of $10.00
One way to attach an identifying day to the discounted price for that day is to set up an array, say
days = ["Mon", "Tue", "Wed", "Thu", "Fri"] , then do a for loop that iterated through the array
#initialize some variables before you start your loop.
price = ?
days = ["Mon", "Tue", "Wed", "Thu", "Fri"]
#now Python will loop through that array, returning an element to you each time through the loop,
starting with "Mon"
for day in days:
# do all your discounting for that day, and then print out the discounted price and the day.
E.g. The initial price, $10.00, would be set, say, on Sunday and then when the store opened on Monday, the discount would be applied at the start of each day.
Step by Step Solution
3.42 Rating (165 Votes )
There are 3 Steps involved in it
Step: 1
Program set initial price for the item initialPrice 1000 s...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