3. Getting There . What's The wrong ?!


#1

Hello .. This is my code :

 def hotel_cost(nights):
    return 140 * nights

def plane_ride_cost(city):
    if city == "Charlotte":
        return 183
    elif city == "tampa":
        return 220
    elif city == pittshurgh:
        return 222
    elif city == "los angeles":
        return 475

It give me error :

> Oops, try again. Did you create a function called plane_ride_cost?

What did i do wrong ?!


#2

Here you go; compare our two bits of code-you'll see what you missed, it's super simple :smile: Look at your casing :sunny:
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


#3

If you still don't see it; it has to do with your Capitalization..


#4

i had compared it many times but i still can't find the difference between them ! :pensive: :sweat:

so i just copy your code and it worked :grin:

thank you ^^ but please did you can told me what did i do wrong


#5

elif city == "tampa":
return 220
elif city == pittshurgh:
return 222
elif city == "los angeles": <-------- See where that needs to be capitalized? Look at your other city names as well :smile: the console is very specific to how you enter the code-especially under their examples; they have to match exactly (punctuation and capitalization count) :smile: hope this helped; if you have any more problems, just message me!


#13