Anonymous
8/20/2025, 7:13:45 PM
No.106325833
>>106324808
you could flex with some bullshit though
def factorial(n):
if n==0: return 1
if n<0 or not isinstance(n,int):
raise ValueError("Must be a positive integer")
return functools.reduce(operator.mul, range(1,n+1))
you could flex with some bullshit though
def factorial(n):
if n==0: return 1
if n<0 or not isinstance(n,int):
raise ValueError("Must be a positive integer")
return functools.reduce(operator.mul, range(1,n+1))