Last active
April 6, 2017 05:53
-
-
Save BolajiOlajide/174923e687c8ee9f76a3dad531c136c4 to your computer and use it in GitHub Desktop.
Python Recursive Function 2
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
def factorial(num): | |
if num == 0: | |
return 1 | |
else: | |
return num * factorial(num - 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment