py-repo

a python playground
Index Commits Files Refs README
factorial.py (174B)
   1 fact = int(input("Ingrese un numero: "))
   2 res = 1
   3 
   4 if fact < 0:
   5     print('Numero invalido')
   6 
   7 else:
   8     for i in range(fact):
   9         res += res * i
  10     print(str(fact) + '! = ' + str(res))