Plan your trip!


hey guys im having trouble with the last exercise for taking a vacation, my code prints 1480 instead of 1955, here it is:

def hotel_cost(days):
    return 140*days

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
        return 0
def rental_car_cost(days):
    cost = 40 * days
    if days>=7:
        return cost-50
    elif days>=3:
       return cost-20
    return cost
def spending_money():
    return spending_money
def trip_cost(city,days,spending_money):
    return plane_ride_cost(city) + hotel_cost(days) + rental_car_cost(days) + spending_money
print trip_cost("los Angeles",5,600)


los Angeles is not a valid destination, so 475 is missing. of the total cost


print trip_cost("Los Angeles",5,600)
can someone tell me what I am doing wrong?


please go go here, make a new topic, fill in the template so we have all the information needed to help you, the information you currently provided is not enough


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