Taking a Vacation


#1


Taking a Vacation


https://www.codecademy.com/courses/python-beginner-P5YtY/1/2?curriculum_id=4f89dab3d788890003000096#


I keep getting the error message "Oops, try again. It looks like plane_ride_cost does not return 220 when the city is Tampa. ". I have NO IDEA why this is happening, it's the same format as Charlotte, and that seems to work fine. Any ideas?


I believe this code should work, but doesn't...


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


#2

your indention is off.

Tampa can only be reached if city is Charlotte


#3

it work only check the spaces on the left of every line


#4

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