Help


#1


I need help. What is wrong with this code?
Error message said: Oops, try again. It looks like rental_car_cost returns 20 instead of the correct amount (40) for 1 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
    elif city == "Los Angeles":
        return 475
def rental_car_cost(days):
    if days >= 7:
        return 40 * days - 50
    elif days <= 3:
        return 40 * days - 20


#2

you should give 20 discount when its 3 or more days, not 3 or less days


#4

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