I have a fibonacci series defined by a recursive function. My assignment is to debug to see how many times the function repeats certain calculations when called. How many times does fib(3) needs to be calculated when calling fib(10).
I have tried to use the pycharm debugging tool but it gets me nowhere. I start by adding a breakpoint in the beginning of the code and clicked debug. Then i tried to follow the code step by step, by the step over f8. Is there some other ways to solve this other than using pycharm?
if n < 3:
return 1
else:
return fib(n-1) + fib (n-2)