Im not sure what its is asking me


Getting there

It is asking me if i made a function called plane_ride_cost. I did that> WHats

def hotel_cost(nights):
    return 140 * nights
def plane_ride_cost(city):
    if city == "Charlotte":
        return 183
    elif city == "Tampa":
        return 220
    else city == "Pittsburgh":
        return 222
    elif city == "Los Angeles":
        return 475


Are you supposed to call it? Can I have the link to look at the instructions?


I fixed but i had to copy and paste someone elses code and it worked. It was the exact same thing.


Didn't catch it, but this is the problem, you can't have a condition in an else statement, so else should have been elif. Not the same code. :slight_smile:


Thanks for clearing that up


No problem, I know that it can be confusing, and i'm sure it was a typo, :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.