Wrong code, need help



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


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

elif city == "Los Angeles":


oh wait yes i always make rookie mistakes like that


You need a : after all if elif and else.


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!


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