loading
open in
main.py
1
2
3
4
5
6
7
8
9
10
11
def factorial(x):
  total = x
  turn = x
  for item in range(x-1):	
    turn -=  1
    total *= turn
  return total

print factorial(4)
print factorial(5)
Python 2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.8.2] on linux