Taking a vacation


#1





is anything wrong in my code ? cuz i always get errpr message : Oops, try again. Did you create a function called plane_ride_cost?


def hotel_cost(nights):
    # if the hotel cost is 140$/night
    return 140 * nights

def plane_ride_cost(nights):
    if city == "Charllotte":
        return 183
    elif city == "Tampa":
        return 220
    elif cit == "Pittsburgh":
        return 222
    elif city == "Los Angeles":
        return 475


#2

take a look at your instruction no.1 again.

also

elif cit == "Pittsburgh":

have typo


#3

... and instruction no. 2, for spellings of city names.


#4

and now i have a new error message Oops, try again. It looks like plane_ride_cost does not return 183 when the city is Charlotte.
cant figure that


#5

Check this carefully ...

if city == "Charllotte":

#6

thanks bro now its worked


#7

Have a great trip. :slight_smile:


#8