3.) Getting There Returning The Cost


#1

So I believe I have set up my code basically parallel to what the example given in this lesson is. However, I keep getting back the error Oops, try again. It looks like plane_ride_cost does not return 183 when the city is Charlotte I can not see why it is not returning 183

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


#2

Hi remove the " " around all your number


#3

Ah thank you very much! I guess it saw it as a string with the "" instead of a number?


#4

I guess it saw it as a string with the "" instead of a number?
-Yes


#5

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