Looks like a bug!


This feels like a bug:

def hotel_cost(nights):
return 140 * nights

def plane_ride_cost(city):
city = city.lower
if city == "charlotte" or "Charlotte":
return 183
elif city == "tampa" or "Tampa":
return 220
elif city == "pittsburgh" or "Pittsburgh":
return 222
elif city == "los angeles" or "Los Angeles":
return 475
return "You have entered an invalid city!"

def rental_car_cost(days):
cost = days * 40
if days >= 7:
cost -= 50
elif days >= 3:
cost -= 20
return cost

def trip_cost(city, days):
return rental_car_cost(days) + plane_ride_cost(city) + hotel_cost(days)
print trip_cost(charlotte, 10)

As when i run this it outputs the error message:

Oops, try again. plane_ride_cost('Tampa') returned 183 instead of the correct value 220

Now correct me if im wrong but returning the number above it clearly specified for the if statement of charlotte is a bug.


For best results,remove the above line and use the exact strings given in the instructions.


Note the example in the error message. The SCT is seeking 'Tampa', not 'tampa'.