Python Glitch - Preventing from Moving Forward in my "Relaxing Vacation"


When I go to hit Save & Submit, the error box pops up with "Oops, try again. It looks like plane_ride_cost does not return 183 when the city is Charlotte"

I have gone through other forums and looked at similar codes, but mine keeps returning this error message, and will sometimes return with a similar error message "....does not return 220 when the city is Tampa". could someone please help me with this or tell me how I will be able to go around this while still completing the full lesson?

def hotel_cost(nights):
    return 140* nights

def plane_ride_cost(city):
    if "Charlotte":
        return "The price is 183"
    elif "Tampa":
        return "The price is 220"
    elif "Pittsburgh":
        return "The price is 222"
    elif "Los Angeles":
        return "The price is 475"


you should return integer values, not strings. How else are you going to calculate the cost of the city + hotel?


would that look something along the lines of

if city == "Tampa":
return int(220)

or am i to be adding together the cost of the city + the flight?

i'm still fumbling through this section of code, so any advice you can give really helps - thank you


220 is a integer, why also cast it to an integer?

this was just telling you what you are going to do later (calculating the cost of the entire trip), and having a string is then not very practical


figured it out! thank you!