The code isn't printing anything to my console


#1

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

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

 return car

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

 print trip_cost("Los Angeles",5,600)

#2

your code is fine but maybe the problem is the indented ,
so I copy your code and I put the indented and it works fine ..

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

def rental_car_cost(days):
    car = 40 * days
    if days >= 7:
        return car - 50 
    elif days >= 3:
        return car - 20
    return car
    
def trip_cost(city,days,spending_money):
    return rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city) + spending_money
print trip_cost("Los Angeles",5,600)

#3

@wizmarco
If you mean print trip_cost("Los Angeles",5,600)` You didn't indent in your code.


#4

but like that its works fine and if you try to indent its say

Oops, try again. It looks like nothing was printed to the console!

#5

Oh I see, you are calling the function, so it has to not be indented.