Created
August 17, 2020 01:09
-
-
Save sagnibak/256dfb22b3ac6bfebd52f6a97c5f7030 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def fac(n, acc=1): | |
if n == 0 or n == 1: | |
return acc | |
else: | |
return fac(n - 1, n * acc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment