Getting there doubt?


I’ve read the other topics so I know what I should do… but I can’t stop wondering why my method didn’t work:

def hotel_cost(nights):
return 140 * nights

def plane_ride_cost(city):
if city.lower() == “charlotte”:
return 183
elif city.lower()==“tampa”:
return 220
elif city.lower()==“pittsburgh”:
return 222
elif city.lower()==“los angeles”:
return 475

The .lower() is just not working here. Why is that? Is there a way to make it work?


The lesson checker expects to see capitalized names, and is not expecting to see the lower() function embellishment. Stick to the instructions as closely as possible without taking liberties.


Ah, okay. I just thought I’d try to apply what I had learned. I’m glad it’s not wrong though. I will keep your advice in mind and stick to the instructions, thanks!


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