Plan your trip!


I do not understand, It keeps giving me an error saying "Oops, try again. It looks like the correct value (1955) was not printed." It seems to me that i did everything right, can you guys please help!?

Replace this line with your code. 
def hotel_cost(nights,):
    print hotel_cost
    return 140 * nights
def plane_ride_cost(city,):
    if city == "Charlotte":
        return 183
    if city == "Tampa":
        return 220
    if city == "Pittsburgh":
        return 222
    if city == "Los Angeles":
        return 475
def rental_car_cost(day,):
    total = 40 * day 
    if day >= 7:
        total -= 50
    elif day >= 3:
        total -= 20
    return total
def trip_cost(city,days,spending_money):
    trip_cost = hotel_cost(days,) + plane_ride_cost(city,) + rental_car_cost(days,) + spending_money
    return trip_cost
    print trip_cost ('Los Angeles', 5, 600)


the trip_cost function call should be outside/after the function


i don't understand.. what does "outside the function" mean ?


currently your trip_cost function call:

print trip_cost ('Los Angeles', 5, 600)

is part of your function content.

But a function call executes the function, why should it be part of your function content?


im so sorry but i still can't quite grasp the concept of what you are trying to say ..


don't run this code

# function deceleration
def example():
   print "right"
   # function call inside the function

# function call outside the function