Taking a Vacation--help wanted


Why there is nothing shown up in the console? Thank you!

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
return "Enter one of the following locations:Charlotte,Tampa,Pittsburgh,Los Angeles"
def rental_car_cost(days):
if days>=7:
return 40*days-50
elif days>=3:
return 40*days-20
elif days<=2 and days>=0:
return 40*days
return 0
def trip_cost(city,days,spending_money):
return hotel_cost(days)+plane_ride_cost(city)+rental_car_cost(days)+spending_money
print trip_cost("Los Angeles", 5, 600)
Replace this line with your code.



I'm guessing that the last line is indented so is not seen by the parser.


Yes! it works´╝ü Thank you!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.