Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Python by vdmklchv ( 7 years ago )
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

for price in prices:
  total_price += price

average_price = total_price / len(prices)

print('Average Haircut Price: ', average_price)

new_prices = [(price - 5) for price in prices]

print(new_prices)

total_revenue = 0

for i in range(0, len(hairstyles)):
  total_revenue = total_revenue + prices[i] * last_week[i]
  
print('Total Revenue: ', total_revenue)

average_daily_revenue = total_revenue / 7

cuts_under_30 = [i for i in hairstyles if new_prices[i] < 30]

print(cuts_under_30)

 

Revise this Paste

Your Name: Code Language: