Functions....Vacation..3.Getting There.----> I think the system got a bug or something


No code error reported in the console or anything, but the program keeps telling me
"Oops, try again. It looks like plane_ride_cost does not return 220 when the city is Tampa." What the heck?!? Why? Everything's spelled correctly, got the colons, indentations, quotes, etc. Is there a different way to write "220" or something?? Please, someone tell me what I'm missing here, it's killin me!
And even when I switch the order of the "if" statements it still has a problem with the "Tampa" one, so I know its this particular one. Any ideas??
When I print plane_ride_cost('Tampa'), 183 pops up in the console, every single time, even when i change the order of the if statements. I dont't get it

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


As you've established, your function ignores the argument given to it. Processing that argument is required in order to make a decision that is based on the argument.


Got it, thanks for your help!


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