Taking a Vacation - Transportation


Here is the code i have, and i get this error: Oops, try again. An error was raised for rental_car_cost(1): maximum recursion depth exceeded
Please help :smiley:


look at this code:

# function declaration
def example(x):
   print x

# function call
example("hello world")

see how i pass as argument on function call, which gets stored in the function parameter. in other words, days contains the number of days the car will be rented. Calling the function inside the function will cause a sort of infinity loop but then with functions, this is called recursion


Thanks :slight_smile: that made alot of sence actually :slight_smile:


good :slight_smile: can you figure it out from here or do you need more help?


I did figure it out, turned out i had some more mistakes, but i figured that out too :slight_smile: So thanks alot :slight_smile:


that is even better if you figure it out yourself :slight_smile: debugging is a separate skill :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.