Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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