Taking a Vacation


There's an issue with line 20 and I can't for the life of me remember how to add in python.
Please correct me

def hotel_cost(nights):
    return 140*nights
def plane_ride_cost(city):
    if city=='Pittsburgh':
        return 222
    elif city=='Tampa':
        return 220
    elif city=='Los Angeles':
        return 475
    elif city=='Charlotte':
        return 183
def rental_car_cost(days):
    if days>=7:
    elif days>=3:
    return x
def trip_cost(city,days):
    s =rental_cost(days)+hotel_cost(days)+plane_ride_cost(city))


you have ")" in the end. delete it and replace s= with return.


In trip_cost, you called the wrong function name. isn't is suppose to be rental_car_cost?


yeah thanks guys I got it. Is there a way to remove a post so I don't waste anyone's time?


u r welcome.
Just marked it as solved.


you are welcome :slight_smile:


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