# Taking a Vacation last exercice problem

#1

https://www.codecademy.com/es/courses/python-beginner-es-i1j3v/1/6?curriculum_id=53a32847fed2a88075000001#

Error mesage shows: "¡Uy! Probá otra vez. ¡Uy! ¿Borraste sin querer la función costo_viaje?"...That translates to Oops!, looks like you deleted ''def costo_de_viaje''

Checked all posts on this exercice and tried diferent stuff but can't get over this one. Can't find what i'm doing wrong. Anyone can point out what i did wrong? Been triying for a couple of days and starting to get nervous. Thanks.

``````def costo_hotel(noches):

return 140 * noches

def costo_del_vuelo(ciudad):

if ciudad == "Córdoba":
return 821

elif ciudad == "Iguazú":
return 941

elif ciudad == "Ushuaia":
return 1280

elif ciudad == "Bariloche":
return 1848

def alquiler_de_auto(dias):

coste = dias * 338

if dias >= 7:
return coste - 100

elif dias >= 3 and dias < 7:
return coste - 50

else:
return coste

def costo_viaje (ciudad, dias, otros_gastos):
return costo_hotel(noches) + costo_del_vuelo(ciudad) + costo_del_auto(dias) +             otros_gastos

print costo_viaje ("Bariloche", 5, 600)

``````

EDIT: Pasted correctly the code, was missing a line in the post.

#2

HI,
I'm not sure if it will help, but try changing costo_hotel's argument noches to dias in the last "return" line,just after the def costo_viaje

Cheers,
Piesiec

#3

This line should not be indented. That makes it part of the function.

#4

``````def costo_hotel(dias):

return 140 * dias

def costo_del_vuelo(ciudad):

if ciudad == "Córdoba":
return 821

elif ciudad == "Iguazú":
return 941

elif ciudad == "Ushuaia":
return 1280

elif ciudad == "Bariloche":
return 1848

def alquiler_de_auto(dias):

coste = dias * 338

if dias >= 7:
return coste - 100

elif dias >= 3 and dias < 7:
return coste - 50

else:
return coste

def costo_viaje (ciudad,dias,otros_gastos):
return costo_hotel(dias)+costo_del_vuelo(ciudad)+alquiler_de_auto(dias)

print costo_viaje ("Bariloche", 5, 600)``````

Both things had to be changed :D, working now that was modified. Thanks for the help. Got stuck with this.
Learning small 'details' count a lot.

#5