Skip to content

Instantly share code, notes, and snippets.

@jb0hn
Created September 9, 2018 19:54
Show Gist options
  • Save jb0hn/70577876fedb61ae0e21e39b014792c5 to your computer and use it in GitHub Desktop.
Save jb0hn/70577876fedb61ae0e21e39b014792c5 to your computer and use it in GitHub Desktop.
Simple fibonacci sequence generator (<255)
# init var
x = 0
y= 1
# main loop
while True:
print(x) # print result
# calculations
z = x + y
x = y
y = z
# condition to print numbers up to 255
if x >= 255:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment