Im not sure what its is asking me


#1



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


#2

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


#3

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


#4

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:


#5

Thanks for clearing that up


#6

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


#7

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