Created
March 29, 2019 23:03
-
-
Save bee-san/fc2d5031710d3618e9468cf10c1552ff to your computer and use it in GitHub Desktop.
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 f(n): | |
if n == 0 or n == 1: | |
return 1 | |
else: | |
fibo = 1 | |
fibroPrev = 1 | |
for i in range (2, n): | |
temp = fibo | |
fibo = fibo + fiboPrev | |
fiboPrev = temp | |
return fibo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment