0 points

python factorial


PHOTO EMBED

Tue Nov 17 2020 18:17:22 GMT+0000 (UTC)

Saved by @le_wiseman #python

def factorial(n):
  if n == 0:
    return 1
  else:
    return n * factorial(n - 1)
print(factorial(5))
content_copyCOPY

simple way to find factorial of a number