Rental Car problem


#1





File "python", line 19
elif days >= 3:
^
SyntaxError: invalid syntax

I expected it to do as intended


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:
    dis1 = (40 * days) - 50
return dis1
elif days >= 3:
    dis2 = (40 * days) - 20
return dis2


#2

Thus ends the function. 40 dollars per day, that's it.


#3

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