Wont print!


#1

here's my attempt... kind find my error at the minute!

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


#2

sorted... needed to remove the indent on "print"


#3

Hi @chipplayer76036 I'm beginner on python and I want to suggest to you something, just because happened to me. I started to make more interactive all the codes that I writte on CODECADEMY and give me a better experience.

I will paste my code for Taking a Vacation lesson. Some part of the code is in Spanish, I'm Mexican

print 'Bienvenido a la Agencia de viajes Rugerio'
nights = int(raw_input('Cuantas noches te quedaras?: '))
def hotel_cost(nights):
    return 140 * nights
print('') #Solo un espacio entre cada pregunta
print('Ciudades disponibles para viajar: Charlotte, Tampa, Pittsburgh and Los Angeles.')
city = raw_input('Selecciona la ciudad destino: ')
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
print('') #Solo un espacio entre cada pregunta 

print('Se le rentara un auto de acuerdo a la cantidad de noches que se quedara en la ciudad')
days = nights
def rental_car_cost(days):
    cost = days * 40
    if (days >= 7):
        return cost - 50
    elif (days >=3):
        return cost -20
    else:
        return cost
print('') #Solo un espacio entre cada pregunta 
    
spending_money = int(raw_input('Cuanto dinero extra se gasto?:'))
def trip_cost(city,days,spending_money):
    return rental_car_cost(days)+hotel_cost(days)+plane_ride_cost(city)+spending_money    

print trip_cost(city,days,spending_money)