Plan your trip gone wrong


#1





plan your trip

i follow the instruction but it seem i am wrong


def hotel_cost(nights):
    return nights * 140
    
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):
    if(days>=7):
        return(days*40)-50
    elif(days>=3):
        return (days*40)-20
    else:
        return days*40

def trip_cost(city,days,spending_money):
    return spending_money + plane_ride_cost(city) +rental_car_cost(days) + hotel_cost(days)
    
print trip_cost("Los Angles",5,600)


#2

here:

print trip_cost("Los Angles",5,600)

you misspelled Los Angeles

so plane_ride_cost returns None (the default) and then you get None type + int error


#3

wew my bad :sweat_smile: thanks !! i wasted 1 hour to find it


#4