dkoug Blog

Basic factorial

Python -- Posted on Aug. 23, 2017

Basic factorial python

1
2
3
4
5
6
7
8
def factorial(n):
    '''
    Fuctorial function
    '''
    if n == 1:
        return n
    else:
        return n * factorial(n-1)