PLAN YOUR TRİP EXERCİSE.can someone tell me what is wrong with this code


#1

def hotel_cost(nights):
return 140*nights
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):
if days>=7:
car_cost=(40*days)-50
elif days>=3:
car_cost=(40*days)-20
return car_cost
def trip_cost(city,days,spending_money):
sum=rental_car_cost(days)+hotel_cost(days)+plane_ride_cost(city)+spending_money
return sum + spending_money
print trip_cost("Los Angeles",5,600)


#2

@unyebaba,

Please re-edit your Post

  • leave one blank-line above of your code
  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.

or even better use
= http://discuss.codecademy.com/t/using-backticks-to-format-your-code/3697