Skip to content

Instantly share code, notes, and snippets.

@PerroBueno
Created May 5, 2018 23:51
Show Gist options
  • Save PerroBueno/cf527d3374b19d512eeeb86934e56ec6 to your computer and use it in GitHub Desktop.
Save PerroBueno/cf527d3374b19d512eeeb86934e56ec6 to your computer and use it in GitHub Desktop.
Prints some fib numbers
def fibonacci():
count = int(input("How many fibs?"))
n1 = 1
n2 = 0
sequence = [0]
for i in range(count):
sequence.append(n1)
n1 = n1 + sequence[n2]
n2 += 1
del sequence[0]
return sequence
while True:
print(fibonacci())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment