def factorial(n): if n==1: return 1 elif n==0: return 1 else: fact=1 for i in range(2,n+1): fact=fact*i return fact
No comments :
Post a Comment