Did you create a function called plane_ride_cost? Error


#1

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 can't find the problem. I defined the plane ride cost function and rearranged everything.


#2

Be sure to quote strings.

if city == "Charlotte":

or

if city == 'Charlotte':

and so on.


#3

Thank you! at first I had the cities quoted and it said that it didn't recognize Charlotte. But I also had it like (str="city") with all of the cities under it quoted...