Wrong code, need help


#1


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


For some reason im getting a syntax error when im sure its right


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


#2

I believe you need : after all the cities for it to pass since you are in python
so for example

elif city == "Los Angeles":

#4

oh wait yes i always make rookie mistakes like that


#5

You need a : after all if elif and else.


#6

Nay, your fine. It is so easy to get caught up in the code and you accidentally forget an easy step like that or spell something wrong. I do it all the time haha. Hope your coding goes well!


#7

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