Hey, You Never Know!


#1

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

Oops, try again. rental_car_cost(3) returned 120 instead of the correct value 100

I don't know what this message means. Can you help me???


#2

you should only give 20 discount for more then 3 days. You currently also give discount for 3 days


#3

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