Skip to content

Instantly share code, notes, and snippets.

@acwoss
Created May 9, 2018 18:22
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 acwoss/4a8e84effe6a04b96e9ecd6ea8bf44da to your computer and use it in GitHub Desktop.
Save acwoss/4a8e84effe6a04b96e9ecd6ea8bf44da to your computer and use it in GitHub Desktop.
GraveCourageousAmoebas created by acwoss - https://repl.it/@acwoss/GraveCourageousAmoebas
def fatorial_range(n):
""" Retorna o fatorial de todos os números entre 1 e n """
next_result = 1
for i in range(1, n+1):
yield next_result
next_result *= i + 1
for fat in fatorial_range(1000):
print(fat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment