Skip to content

Instantly share code, notes, and snippets.

@jasonLaster
Created June 15, 2012 19:55
Show Gist options
  • Save jasonLaster/2938425 to your computer and use it in GitHub Desktop.
Save jasonLaster/2938425 to your computer and use it in GitHub Desktop.
CodeStack -- Factorial Example
# dumb recursive factorial
def fact(n):
if (n <= 1):
return 1
else:
return n * fact(n - 1)
print fact(6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment