Pull It Together


#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/pull-it-together-

<In what way does your code behave incorrectly? Include ALL error messages.>
Error message is 'Make sure to define a function called Rental_car_cost.
Help???

<What do you expect to happen instead?>

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

def rental_car_cost(days):
cost = 40 * days
if days >= 7:
cost -= 50
elif days >= 3:
cost -= 20
return cost

def trip_cost(city, days):
return rental_car_cost(cost) + hotel_cost(days) + plane_ride_cost(city)

<do not remove the three backticks above>

#2

Hi all,

It just keeps saying ‘make sure to define a function called Rental_car_cost,’ but it is defined above?

My first time posting a question, sorry for not deleting the comments!

Thanks


#3

days parameter should be the call argument.


#4

Ah! Thanks very much


#5

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