Getting there... What am I doing wrong?


Error code: Oops, try again. Did you create a function called plane_ride_cost?

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

So, What am I doing wrong? I thought I did define plane_ride_cost.


Something must have interrupted the lesson checker so it only sent the best error message it had. There must be a console error message; is there one?


Ha! Figured it out. I was so confused by the "Oops" error I didn't realize I forgot the colons after the "if" and "elif" statements.

I'm a n00b...

Anyway, thanks for your help! You pointed me in the right direction.


Also, make sure you have an else statement at the end...just in case!


Not required in this exercise, but you raise a good point. In a production sense there should always be a default return value in absence of matchable inputs.