Taking a Vacation 4/3


#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

This is the code for my assignment. It seems to be exactly what is asked in the instructions and hint. But whenever I press submit this happens "Oops, try again. Did you create a function called plane_ride_cost?" I clearly have created that function. Why isn't it working?


#2

try this:
def plane_ride_cost(city):
if city == "Charlote":
return 183
elif city == "Tampa":
return 220
elif city == "Pittsburgh":
return 222
elif city == "Los Angeles":
return 475
return plane_ride_cost()