Factorial

Find the Factorial of a Number, program code explanation, and output.

Hey internet mates here we are going to make a python program to get the factorial of the given number.

Program code:-
def fact (n):
    if n==1:
        return(n)
    else:
        return n*fact(n-1)
n=int(input("Enter no.:-"))
print(fact(n))

Leave a Comment

Your email address will not be published.