def factorial(n):
assert int(n) == n and n > 0,"Enter a positive integer only
if n == 0: #base condition
return 1
else:
return n*factorial(n - 1) #Recursive case
print(factorial(n))
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)