Taking a Vacations - 4. Transportation


#1




Hi Everyone,

Not sure why the below throws up an error


I keep getting the following error:

Oops, try again. It looks like rental_car_cost returns -20 instead of the correct amount (100) for 3 days.


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
    else: 
        return 475
def rental_car_cost(days):
    cost = 40 * days
    if days >= 7:
        cost = -50
    elif days >=3:
        cost = -20
    return cost


#2

here:

cost = -50

You should decrease cost by 50, you assign -50 to cost.


#3

Thank you!

Just got it


#4