Getting There


#1

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"


#2

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


#3

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


#4

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


#5

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


#6

I solved the issue and thanks for your help


#7

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?


#8

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.