def factorial(n):
## Your code - begin
    if (n==0): #base case.
        return 1
    else:
        return n*factorial(n-1) #recursive function for calculating factorial.
## Your code - end

if __name__ == "__main__":
	n = input("Enter number: ")
	output = factorial(n)
	print output

a66c2199ab20dd243649a51e14bcdf70ff72aa83
def factorial(n):
## Your code - begin
    if (n==0): #base case.
        return 1
    else:
        return n*factorial(n-1) #recursive function for calculating factorial.
## Your code - end

if __name__ == "__main__":
	n = input("Enter number: ")
	output = factorial(n)
	print output
