Plan your trip


#1

@stetim94

I did the same mistake as @rajluckshmi and I don't get what you mean by "I would place the function call of trip_cost outside the trip_cost function".

I have been stuck on this excercise for a long time, so I need help.

Here's my code for that part:

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))

Thanks!


#2

The above line is written inside the function block. Remove the indentation so it is outside of the function.


#3

Hi, thank you so much for your reply.

I tried what you said, but it still does not work.

Here's my code for the same part:

def tripcost(city, days, spendingmoney):
    return planeridecost(city) + rentalcarcost(days) + hotelcost(days) + spendingmoney
print tripcost("Los Angeles", 5, 600)

And now it's saying: Oops! Did you accidentally delete the trip_cost function?

Thanks!


#4

Check the names of your function and the variables. trip_cost vs tripcost, etc.


#5

Hi i did what you said mtf but now it says i printed nothing to console


#6

fixed it forgot to put print