Pull it Together Exercise Error


#1



Taking a Vacation /Pull it Together


Error Message > . trip_cost('Charlotte', 0) raised an error: unsupported operand type(s) for -: 'str' and 'int'

Could u please help me to solve what is the error in my code?


Replace this line with your code. 
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
    else:
        return "Enter City Again"

def rental_car_cost(days):
    if days >= 7:
        return (days * 40) -50 
    elif days >= 3:
        return (days * 40) - 20
    else:
        return (days * 40)
    
def trip_cost(days, city):
    trip_cost = hotel_cost(days)+plane_ride_cost(city)+rental_car_cost(days)


#2

look:

def trip_cost(days, city):

your parameter order: days city

the function call by the exercise:

 trip_cost('Charlotte', 0)

order of arguments: city days

Oops, that is going to cause problems


#4

did you manage it?


#5

Thank u very much for the help, noticed some other mistakes and corrected them too !


#6