Created
July 25, 2011 08:02
-
-
Save kaiquewdev/1103740 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/python | |
#pega a entrada do usuario | |
n = raw_input('Digite o valor: ') | |
def fatorar(v): | |
if v: | |
try: | |
v = int(v) | |
except ValueError: | |
v = 0 | |
n = v | |
k = range(1,n) | |
o = len(k) | |
for f in reversed(k): | |
o += o*f | |
if o > 10000: | |
print '' | |
else: | |
print o | |
else: | |
print 'Nao pode ficar vazio' | |
fatorar(n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment