Taking a vacation problem


#1

trip_cost(city,days)
return sum(rental_car_cost(days),hotel_cost(days), and plane_ride_cost(city)

Are we supposed to use the sum function like I have above? Ive tried a couple different indentations and it doesny seem to work.


#2

Hi @rblo10,

As you have stated, indentation is important in Python and it always helps us if you post the entirety of your code and the error message you get for a given exercise. In doing so, I'd recommand you use the following trick:

Whenever you would like to paste code, since this forum supports Markdown Syntax you can use three backticks before and after your code block like so:

```
def my_func(x):
my_var = 0
if x > my_var:
sum = my_var + x
else:
print "Odelay!"
return sum
```

and it will retain proper indentation and even have nifty syntax highlighting:

def my_func(x):
    my_var = 0
    if x > my_var:
      sum = my_var + x
    else:
      print "Odelay!"
    return sum

That being said: Just regular addition will work... :smile:

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