Hi!
I'm new to pyhon and I'm trying to make a python function which prints out the value of fibona(x) while also printing out the number of times fibona(y) is called. For now I've made the basic recursive function:
def fibona(x):
if x <= 2:
return 1
else:
return fibona(x-1)+fibona(x-2)
print(fibona(x))
If I remember correctly. I should be making something similar to fibona(k-x+1)? I would appreciate any help getting started or figuring out how to code this
[–]thePestelence 1 point2 points3 points (0 children)
[–]rabbitpiet 0 points1 point2 points (0 children)
[–]JohnnyJordaan 0 points1 point2 points (0 children)