5/7 Taking a Vacation


Hello, I am very confused here can anyone show me what I am doing wrong?
Here is my code:
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
def rental_car_cost(days):
Cost = 40 * days
if days >= 7:
Cost -= 50
elif days >= 3:
Cost -= 20
return Cost
def trip_cost(city, days):
return rental_car_cost(days), hotel_cost(days), and plane_ride_cost(city)
return trip_cost
I keep getting a syntax error. Help Please, Thanks



You're supposed to return the sum of those functions, not all of them at once :slightly_smiling:


@g4be Thank you very much! Have a great day!


@g4be But how exactly would I do that??


No problem, Romanbeya! Glad to help!

And to do that just use the plus operator "+" between each function call.


return functA() + functB()


@g4be Thank you! You have been a great help!!


No problem, Romanbeya! Glad to help!