https://www.codecademy.com/courses/learn-python-3/projects/carlys-clippers
Here’s my code so far for the project. However I keep getting a Type Error for my last line of code. I don’t understand why because it is the same code used by the instructor.
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
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)
total_revenue = [0]
for i in range(len(hairstyles)):
total_revenue += prices[i] * last_week[i]