Skip to content

Instantly share code, notes, and snippets.

@danhab99
Last active November 20, 2019 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danhab99/368a180d73e5a20a6b81932faac2bc10 to your computer and use it in GitHub Desktop.
Save danhab99/368a180d73e5a20a6b81932faac2bc10 to your computer and use it in GitHub Desktop.
Definitions described here https://youtu.be/2gKxuBoxIm0
# Definitions described here https://youtu.be/2gKxuBoxIm0
def factorial(n):
if n == 1:
return n
else:
return n * factorial(n - 1)
def super_factorial(n):
def sf(n):
if n == 1:
return factorial(n)
else:
return n * sf(n - 1)
return factorial(n) * sf(n)
def hyper_factorial(n):
def hf(n):
if n == 1:
return n ** n
else:
return n * hyper_factorial(n - 1)
return (n ** n) * hf(n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment