Taking a vacation 5 pull it together


when ever i run this code i get the error

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

please help i am so stuck!!!!

def hotel_cost(nights):
return 140 * nights

def plane_ride_cost(city):
if city == "Charlotte":
return 183
elif city == "los Angeles":
return 475
elif city == 'pittsburgh':
return 222
def rental_car_cost(days):
n = 40
if days >= 7:
return (days*n-50)
elif days >=3:
return (days*n-20)
return (days*n)

def trip_cost(city,days):
return hotel_cost(nights)+ plane_ride_cost(city) + rental_car_cost(days)


It says your code fails on tampa, have you written code to handle that?


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