From 6e44bea2ac9ccd2522af6b790d7eda4d4182820a Mon Sep 17 00:00:00 2001 From: Gian Palmares <134014320+GianPalmares@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:21:02 +0000 Subject: [PATCH] Create Carly's Clippers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ou are the Data Analyst at Carly’s Clippers, the newest hair salon on the block. Your job is to go through the lists of data that have been collected in the past couple of weeks. You will be calculating some important metrics that Carly can use to plan out the operation of the business for the rest of the month. You have been provided with three lists: hairstyles: the names of the cuts offered at Carly’s Clippers. prices: the price of each hairstyle in the hairstyles list. last_week: the number of purchases for each hairstyle type in the last week. Each index in hairstyles corresponds to an associated index in prices and last_week. For example, The hairstyle "bouffant" has an associated price of 30 from the prices list, and was purchased 2 times in the last week as shown in the last_week list. Each of these elements are in the first index of their respective lists. --- Carly's Clippers | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Carly's Clippers diff --git a/Carly's Clippers b/Carly's Clippers new file mode 100644 index 0000000..15fbe75 --- /dev/null +++ b/Carly's Clippers @@ -0,0 +1,33 @@ +#Carly's Clippers + +hairstyles = ["bouffant", "pixie", "dreadlocks", "crew", "bowl", "bob", "mohawk", "flattop"] + +prices = [30, 25, 40, 20, 20, 35, 50, 35] + +last_week = [2, 3, 5, 8, 4, 4, 6, 2] + +new_prices = [price - 5 for price in prices] + +total_price = 0 + +total_revenue = 0 + +for price in prices: + total_price += price +print(total_price) + +average_price = total_price / len(prices) +print(f"Average Haircut Price: £{average_price}") + +print(f"New Price List: {new_prices}") + +for i in range(len(hairstyles)): + total_revenue += prices[i] * last_week[i] + +print(f"Total Revenue: £{total_revenue}") + +average_daily_revenue = total_revenue / 7 +print(f"Average Daily Revenue: £{average_daily_revenue}") + +cuts_under_30 = [hairstyles[i] for i in range(len(new_prices)) if new_prices[i] < 30] +print(f"Cuts Under £30: {cuts_under_30}")