We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8682a38 commit 15651bdCopy full SHA for 15651bd
recursive-fibonacci.py
@@ -1,5 +1,5 @@
1
def fib(n):
2
- if n <= 1:
+ if n == 0 or n == 1:
3
return n
4
else:
5
return(fib(n-1) + fib(n-2))
0 commit comments