Why is my syntax wrong?


It says my syntax is wrong due to an indentation error with if days > = 7: It appears indented with the correct syntax. Please help.

My code

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 .50*40*days
    elif days >= 3:
        return .20*40*days
    elif days == 1:2
        return 40*days


 File "python", line 14
    if days >= 7:
IndentationError: unindent does not match any outer indentation level


The errors are practically jumping off the page. Go back and review the unit on syntax and see if you cannot solve this one yourself. Be sure to check your work against the instructions.


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