Why isnt my code working?


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 "i dont know"


whats is your error message ?


In def plane_ride_cost(city) you are returning ints as strings. Any place you are returning numbers, remove the quotes from around the number.


You have quotes around your numbers in your plane ride function which makes them strings, remove the quotes from the numbers in your return statements and you should be good. :slight_smile:


Yeah...Thanks...That worked out!:slight_smile:


Thank You...that worked!:slight_smile:


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