Skip to content

Instantly share code, notes, and snippets.

@angeloped
Last active February 1, 2020 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angeloped/a0e847ccf08aef45d9b0bfc766910a97 to your computer and use it in GitHub Desktop.
Save angeloped/a0e847ccf08aef45d9b0bfc766910a97 to your computer and use it in GitHub Desktop.
Fibonacci seqence written in Python.
'''
written by: Bryan Angelo
'''
seq = []
# infinite loop
while 1:
if len(seq) == 0:
seq.append(1)
elif len(seq) == 1:
seq.append(seq[0] + seq[0])
else:
seq.append(seq[len(seq)-1] + seq[len(seq)-2])
print(len(seq))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment