@amasad/DimgreyUnhappyMallard
Python3

No description

repl talk
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
def factorial(n):
  if n == 0:
    return 1
  else:
    fact = n * factorial(n - 1)
    print('factorial of {}: {}'.format(n, fact))
    return fact

print(factorial(5))
Python 3.6.1 (default, Dec 2015, 13:05:11) [GCC 4.8.2] on linux