Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions LargeFactorial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#Find the factorial of number<20
#and also number>20


#For number<=20
def fact(x):
if x==0:
return 1
else:
return x*fact(x-1)


#For number >=20
i=int(input())
fact=1
for j in range(i,-1,-1):
if j!=0:
fact=fact*j
else:
fact=fact*1