Skip to content

Instantly share code, notes, and snippets.

@KenoLeon
Last active May 3, 2022 00:54
Show Gist options
  • Select an option

  • Save KenoLeon/c34b5113931d4714f59cefd98b407154 to your computer and use it in GitHub Desktop.

Select an option

Save KenoLeon/c34b5113931d4714f59cefd98b407154 to your computer and use it in GitHub Desktop.
fibonaci python below number
# print fibonacci numbers
def fib(n):
a, b = 0, 1
while b < n:
print(b, end=' ')
a, b = b, a + b
print()
fib(100)
# Should give you >>
# 1 1 2 3 5 8 13 21 34 55 89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment