Getting There


At first I was stuck on Charlotte, then I managed to fix that but now Tampa is stating incorrect, but they're pretty darn similar. I've looked at other posts but none seem to be the same as mine :confused:

Oops, try again. It looks like plane_ride_cost does not return 220 when the city is Tampa.

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


Your function ignores its parameter, there's no way it'll be able to figure out the plane cost without considering what the destination is


When I added:city == " that fixed it. I'm still trying to understand the functions I'm creating. It's a learning process, for sure.


Note that your hotel_cost function calls itself each time it is called - that's an infinite loop


Thanks! I've fixed that, even though it worked. For my own knowledge, that's going to cause problems, I assume?


Infinite loops always cause problems.


Well it's not going to finish.. There won't be a result


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