Help on 7. Plan your 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/python-beginner-P5YtY/1/6?curriculum_id=4f89dab3d788890003000096#
<In what way does your code behave incorrectly? Include ALL error messages.>
My issue is that the current code prints “None” to the console instead of what I want (See last line of code)

```python

def hotel_cost(nights):
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
else:
return False

def rental_car_cost(days):
total = days*40
if days >= 7:
return total - 50
elif days >= 3:
return total - 20
elif days < 3:
return total
else:
return False

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 problem is that you nested the print statement inside the function. This way, it will not run.