Guest User

Untitled

a guest
Dec 9th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. hairstyles = ["bouffant", "pixie", "dreadlocks", "crew", "bowl", "bob", "mohawk", "flattop"]
  2.  
  3. prices = [30, 25, 40, 20, 20, 35, 50, 35]
  4.  
  5. last_week = [2, 3, 5, 8, 4, 4, 6, 2]
  6.  
  7. total_prices = 0
  8. for price in prices:
  9. total_prices = total_prices + price
  10. average_price = total_price / len(prices)
  11. print("Average Price: ${0}".format(average_price))
  12.  
  13. new_prices = [price - 5 for price in prices]
  14. print(new_prices)
  15.  
  16. total_revenue = 0
  17. for i in range(len(hairstyles)):
  18. total_revenue += prices[i] * last_week[i]
  19. print("Total Revenue: ${0}".format(total_revenue))
  20.  
  21. average_daily_revenue = total_revenue / 7
  22. print("Average Daily Revenue:${0}".format(average_daily_revenue))
  23.  
  24. cuts_under_30 = [hairstyles[i]for i in range(len(haristyles))if new_prices[i] < 30
  25. print(cuts_under_30)
  26.  
  27. ]
Add Comment
Please, Sign In to add comment