Taking a Vacation 3.Getting There


This code is giving me this error
Oops, try again. It looks like plane_ride_cost does not return 183 when the city is Charlotte.
I don't understand why, its says 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
return 0


So what is the result of plane_ride_cost("Charlotte")?

print plane_ride_cost("Charlotte")
=> 0

Why? Because "Charlotte" is not equal to "charlotte" :slight_smile:


Ohh, okay thanks !!!


You're very welcome :slight_smile:


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