Make sure to define trip_cost


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


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

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


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


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