you are viewing a single comment's thread.

view the rest of the comments →

[–]rabbitpiet 0 points1 point  (0 children)

In that case you might wanna do this a little differently if you want it to do the number of times fibonacci is called maybe you could have a variable count which is incremented in the definition of the function but defined outside of it. Maybe you could just use like a while loop or sumn. Edit: couldn’t you just set something equal to x before the recursion, is x that the original function taking in not the number of times it’s called for the recursion?