Python: Planning a Trip


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

https://www.codecademy.com/courses/learn-python/lessons/taking-a-vacation/exercises/plan-your-trip?action=lesson_resume&link_content_target=interstitial_lesson

<In what way does your code behave incorrectly? Include ALL error messages.>
I keep getting the error “failure to print to console” I have looked at other topics and tried to make changes but I am still getting the error. Not sure if it is an indentation thing or my syntax is off.

<What do you expect to happen instead?>
Pass my lesson.

```python
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 < 3:
        return 40 * days
    elif days > 6:
        return 40 * days - 50
    else:
        return 40 * days - 20
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);
<do not remove the three backticks above>

#2

the function call executes the function, so it should be placed outside/after the function, not inside the function (hint: indent)


#3

ok I saw this answer in previous posts. I guess I am confused as to which function is which when you say that as there are a few in here.


#4

OK so it works now. I removed the indent on the print function. Thank you. I thought I had already submitted that.


#5