Why won't my code work?


Why won't my code work?
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"

I cannot find out whats happening here!

Because you have written numbers as strings. "183" should be, 183. Same applies to the others.


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