Skip to content

Instantly share code, notes, and snippets.

@py310
Created June 7, 2023 13:50
Show Gist options
  • Save py310/1d7ef0af43deb535f3daf70e66740256 to your computer and use it in GitHub Desktop.
Save py310/1d7ef0af43deb535f3daf70e66740256 to your computer and use it in GitHub Desktop.
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment