Created
May 9, 2018 18:22
-
-
Save acwoss/4a8e84effe6a04b96e9ecd6ea8bf44da to your computer and use it in GitHub Desktop.
GraveCourageousAmoebas created by acwoss - https://repl.it/@acwoss/GraveCourageousAmoebas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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