3. getting there ( help)


#1



https://www.codecademy.com/courses/python-beginner-P5YtY/1/2?curriculum_id=4f89dab3d788890003000096

Oops, try again.
It looks like plane_ride_cost does not return 183 when the city is Charlotte.


can anyone please tell me how to deal with this error message


def hotel_cost(nights):
    #per night cost is $140
    return nights*140
def plane_ride_cost(city):
    if city == "charlotte":
        return 183
    elif city == "tampa": 
        return 220
    elif city == "pittsburg":
        return 222
    elif city == "Los Angeles":
        return 475


3. getting there (help )
#2

Hi this line

if city == "charlotte":

shold be Charlotte with the uppercase C check for the others too


#3



https://www.codecademy.com/courses/python-beginner-P5YtY/1/2?curriculum_id=4f89dab3d788890003000096


File "python", line 11
else city == "Los Angeles":
^
SyntaxError: invalid syntax


when i remove the else and replace it with elif it still doesnt work but it does not show this particular error message.
SO i got two doubts 1) why it giving me an error message on else @)how to go about this excercise


def hotel_cost(nights):
    #per night cost is $140
    return nights*140
def plane_ride_cost(city):
    if city == "charlotte":
        return 183
    elif city == "tampa": 
        return 220
    elif city == "pittsburg":
        return 222
    else city == "Los Angeles":
        return 475


#4

else can't have a condition, change else to else if


#5

thanks a lot
It was a lot of help


#6