Skip to content

Instantly share code, notes, and snippets.

@kaiquewdev
Created July 25, 2011 08:02
Show Gist options
  • Save kaiquewdev/1103740 to your computer and use it in GitHub Desktop.
Save kaiquewdev/1103740 to your computer and use it in GitHub Desktop.
#!/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