Getting there


to create a function that takes a string and return a flight cost

File "python", line 5
return 183
IndentationError: expected an indented block

Replace this line with your 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 "Los Angeles":
                return 475


indention refers to the amount of spacing at the beginning at line, in your case its a bit off

When do you need to indent and why?


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