5/7 help me


#1

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
else :
return 475

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

def trip_cost(city,days):

def add(a,b,c):
return plane_ride_cost(a) + rental_car_cost(b)+hotel_cost(c)


#2

This one worked for me, remembr to put correct indent in their places

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):
if days >=7:
return days*40-50
elif days >=3:
return days * 40 - 20
else:
return days * 40

def trip_cost(city,days):
return plane_ride_cost(city)+rental_car_cost(days)+days*140


#3

This one worked for me

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) + plane_ride_cost(city)             + hotel_cost(days)

#4

Thank you. I reached this point. But how to print when it comes the trip to Los Angeles for five days with an extra of $600? I've tried and tried, as you can see this code that's not printing on console output:

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,spending_money):
return hotel_cost(days) + plane_ride_cost(city) + rental_car_cost(days) + spending_money
print trip_cost('Los Angeles',5,600)

Thank you, please, help me.