Getting There


This is my code why does it keep asking did you create a function called plane_ride_cost when i have already created it

def hotel_cost(nights):
# If i spend 140 $/ night
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"


Maybe it isn't accessible. Have you tried using it to confirm that it behaves like it should?


It doesn't show any error in the console . So i guess it works fine.


Have you tried using it? My broken plane isn't crashing. (but it would if it was in the air; it's broken)


Here's the screen shot of the code see for yourself and say what's wrong with it .


I solved the issue and thanks for your help


What did you do to solve it? I am doing the same thing you initially did at first and I don't understand where am I going wrong?


I imagine he fixed it by unindenting the function. As shown in the screen shot it's part of the previous function and not its own.