fibonacci and write the recursive function
Anoniem
Your solution is incorrect, if your value of n is too high (lets say greater than 10,000) it could cause a stack overflow due to the replicated stack frames. What you want to do is provide an iterative rather than recursive solution. For example: def fibonacci(n): x = 0 ,1 for i in range(n): a,b = b,a+b return a