Created
May 19, 2018 16:45
-
-
Save jutikorn/83fb82fc6790f8e9664c473fd217b679 to your computer and use it in GitHub Desktop.
fibo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def func(n): | |
return func_1(0, 1, n) | |
def func_1(a, b, n): | |
if( n > 1): | |
return func_1(b, a+b, n-1) | |
else: | |
return b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment