Need help with Taking a Vacation 5/7


I am struggling with Taking a Vacation 5/7. Every time I run it, this error shows up: "trip_cost('Tampa', 2) raised an error: global name 'plane_ride__cost' is not defined. My code looks like this:

Taking a Vacation 5/7

trip_cost('Tampa', 2) raised an error: global name 'plane_ride__cost' is not defined

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):
    if days>=7:
        return (days*40)-50
    elif days>=3 and days<=7:
        return (days*40)-20
        return days*40
def trip_cost(city, days):
    return hotel_cost(days)+plane_ride__cost(city) +rental_car_cost(days)


you have two underscores, _, between ride and cost, but only need one.


Thank you so much! I didn't catch that. I appreciate the help. :grinning:


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