3. getting there


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

It looks like plane_ride_cost does not return 220 when the city is Tampa.

idont understand can anyone help me?


@muffens ,

You should format code when you post it, so we can see the indentation and other important details. See How do I format code in my posts?.

You have …

elif "Tampa":

"Tampa" will not suffice as a condition for the purposes of this program. Compare the value of city to "Tampa", as follows …

elif city == "Tampa":

The if and the elif headers all need to have their conditions revised.

All the city names must begin with an uppercase letter. Check them carefully.


thank you that really helped