5/7 what's wrong?


What's wrong in my code?
When I press Save and Submit the website says:
Oops, try again. trip_cost('Tampa', 6) raised an error: unsupported operand type(s) for -: 'str' and 'int' not like I understand a word of that sentence.

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):
cost = days*40
if days >= 7 :
return cost - 50
elif days>= 3:
return cost - 20
return cost

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

It would be very meaningful to me if someone helped me


put a space between the ) and the +


wrong post :neutral_face:


It didn't work, is there anything else that's wrong?
Thank you for the help


Your return cost should be "return cost -= 50" and "return -= ".

You are missing the '=' signs.


Try to change:
def trip_cost(days,city):


def trip_cost(city, days):

due to Codecademy have to check your code and they want it that way.