Make sure to define trip_cost


#1



it keeps telling me to make sure i define a function called trip_cost when im certain i already did.


saying i havent defined something in a function when i know i have


Replace this line with your code. 
 def trip_cost(city, days):
      
        return sum(hotel_cost(days)+rental_car_cost(days) + plane_ride_cost(city))


#2

@boardrockstar66779,
The problem is
you using the sum() function with the wrong argument type

From
https://docs.python.org/2/library/functions.html
https://docs.python.org/2/library/functions.html#sum
you see that the sum() function expects a =list= as argument

So you will either have to use

return sum([hotel_cost(days),rental_car_cost(days),plane_ride_cost(city)])

OR

return hotel_cost(days)+rental_car_cost(days) + plane_ride_cost(city)

#3

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