Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 7, 2021 01:37
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 parzibyte/736d291870411bcce0345ad28462e8e3 to your computer and use it in GitHub Desktop.
Save parzibyte/736d291870411bcce0345ad28462e8e3 to your computer and use it in GitHub Desktop.
def fibonacci_iterativo(posicion, debe_imprimir):
actual = 0
siguiente = 1
for x in range(posicion + 1):
if debe_imprimir:
print(str(actual) + ",", end="")
temporal = actual
actual = siguiente
siguiente = siguiente + temporal
return temporal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment