Programming Example

Write a Python function to calculate the factorial value of given number using recursion.


def fact(n):
    if n==1:
        return 1
        return n*fact(n-1)
num=int(input("Enter any Number "))
print("Factorial is : ",ans);

Enter any Number 5

Factorial is :  120

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad