Created
May 9, 2018 18:22
Star
You must be signed in to star a gist
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