Every about : Taking a Vacation


#1

def hotel_cost(nights):
return nights * 140
def plane_ride_cost(city):
if city == "Charlotte":
return 183
elif city == "Tampa":
return 220
elif city == "Pittsburgh":
return 222
elif city == "Los Angeles":
return 475
def rental_car_cost(days):
aluguel = 40 * days
if days >= 7:
aluguel -= 50
elif days >=3:
aluguel -= 20
return aluguel
def trip_cost(city,days,spending_money):
return (rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city) + spending_money)
print trip_cost("Los Angeles",5,600)


#2

I saw your code and its all fine but it could be a indent problem so can you post the error


#3

You have no problems in the code to fix the formatting time to copy.