Taking A Vacation: Pulling it All Together


I am stuck on this excersise. Below is my code. This is the error message I keep receiving: Oops, try again. hotel_cost(1) raised an error: maximum recursion depth exceeded

Please Help!

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

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


Be sure that your function blocks are correctly indented:

def hotel_cost(nights):
    return 140 * nights

Four spaces of indent on each line inside the block. Same applies to the other functions.



I did indent everything using the tab space. I don't know why but it doesn't show up that way on the screen. Thank you though. Do you see anything else that may be wrong?


BTW: I figured it out. Thanks anyways