Oops, try again. trip_cost('Charlotte', 7) returned None instead of the correct value 1393


#1


https://codecademy.com/courses/python-beginner-P5YtY/1/4?curriculum_id=4f89dab3d788890003000096

when I click save and submit code it says "Oopa, try again. trip_cost('Charlotte', 7) returned None instead of the correct value,

What is wrong with my code? The rest of the excersises were correct but I've been stuck at this one for a very long time and nothing seems to work.

def hotel_cost(days):
    return 140 * days
    
def plane_ride_cost(city):
    if city=='Charlotte':
        return 183
    if city=='Tampa':
        return 220
    if city=='Pittsburgh':
        return 222
    if city=='Los Angeles':
       return 475
    else:
        return "None"
        
def rental_car_cost(days):
    cost = 40 * days
    if days>=7:
        return cost-50
    if days>=3 and days<7:
        return cost-20
    else:
        return cost
       
def trip_cost(city, days):
    rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city)


#2

your trip_cost function doesn't return anything, use the return keyword to return the total trip cost


#3

thank you so much! I can't believe I missed it. I just forgot to add the return. it works now.


#4