Taking a Vacation 3.Getting There


#1

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
else:
return 0


#2

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:


#3

Ohh, okay thanks !!!


#4

You're very welcome :slight_smile:


#5

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