From a6e32a2296e347a34b56c8c5d89d8e8b90f513b5 Mon Sep 17 00:00:00 2001 From: Josh Mudge Date: Fri, 1 Feb 2019 21:57:02 -0700 Subject: [PATCH] Carly's Clippers --- Codecadmey Projects/Carlys_Clippers.py | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Codecadmey Projects/Carlys_Clippers.py diff --git a/Codecadmey Projects/Carlys_Clippers.py b/Codecadmey Projects/Carlys_Clippers.py new file mode 100644 index 0000000..6074b98 --- /dev/null +++ b/Codecadmey Projects/Carlys_Clippers.py @@ -0,0 +1,32 @@ +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] + +total_price = 0 + +total_revenue = 0 + +for price in prices: + total_price += price + print(total_price) + +average_price = total_price / len(prices) +print("Average Haircut Price: $" + str(average_price)) + +new_prices = [price - 5 for price in prices] +print(new_prices) + +for i in range(len(hairstyles)): + total_revenue += prices[i] * last_week[i] + +print("Total Revenue $" + str(total_revenue)) + +average_daily_revenue = total_revenue / 7 +print("Average Daily Revenue $" + str(average_daily_revenue)) + +#print(range(0, (len(hairstyles) - 1))) +cuts_under_30 = [hairstyles[i] for i in range(0, (len(hairstyles) - 1)) if new_prices[i] < 30] + +print(cuts_under_30)