Created
January 8, 2016 15:20
-
-
Save libert-xyz/385490dee3d9f5411cc5 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
#Libert R Schmidt | |
#http://www.practicepython.org/exercise/2014/04/30/13-fibonacci.html | |
def fibo(num): | |
s1 = 0 | |
s2 = 1 | |
l = [] | |
for i in range(num+1): | |
s2 = s2 + s1 | |
s1 = s2 - s1 | |
l.append(s2) | |
print (l) | |
num = int(input("range of numbers: ")) | |
fibo(num) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great!