Following is the code to calculate factorial using recursion function :
def fact(x):
sum=0
if x ==1:
return x
else:
sum += x*fact(x-1)
return sum
print(fact(1000))
Language:
A Skill Development Platform