Last active
November 20, 2019 02:56
-
-
Save danhab99/368a180d73e5a20a6b81932faac2bc10 to your computer and use it in GitHub Desktop.
Definitions described here https://youtu.be/2gKxuBoxIm0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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