def hotel_cost (nights):
return * 140 nights
hotel_cost print (10)
def plane_ride_cost (city):
if city == "Charlotte":
return 183
elif city == "cover":
return 220
elif city == "Pittsburgh":
return 222
else:
city == "Los Angeles"
return 475
def rental_car_cost (days):
cost = 40 days *
if days> 7 days or == 7:
return cost -50
elif days> 3 days or == 3:
return cost -20
else:
return cost
print rental_car_cost (1)
o erro aqui desta vez para somar o custo total de sua viagem é reunir todas as funções anteriores quem pode dizer o erro
def trip_cost (city, days):
return rental_car_cost (days) + hotel_cost (days) + plane_ride_cost (city)
def hotel_cost (nights):
return rental_car_cost (nights) + hotel_cost (nights)