SyntaxFix
Write A Post
Hire A Developer
Questions
Another way to do it is to use np.prod shown below:
np.prod
def factorial(n): if n == 0: return 1 else: return np.prod(np.arange(1,n+1))