can anyone who knows python help me with this exercise ?
def hotel_cost(nights):
if hotel_cost == 140 / 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):
rent = 40 days
if days >= 7:
rent -= 50
elif days >= 3:
rent -= 20
return rent
1- Below the existing code, define a function called | trip_cost | that takes two arguments, | city | and | days |
2- make your function return the sum of calling the
| rental_car_cost(days) | ,
| hotel_cost(days) | ,
and | plane_ride_cost(city) | functions.
def hotel_cost(nights):
if hotel_cost == 140 / 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):
rent = 40 days
if days >= 7:
rent -= 50
elif days >= 3:
rent -= 20
return rent
1- Below the existing code, define a function called | trip_cost | that takes two arguments, | city | and | days |
2- make your function return the sum of calling the
| rental_car_cost(days) | ,
| hotel_cost(days) | ,
and | plane_ride_cost(city) | functions.

