Skip to content

Instantly share code, notes, and snippets.

@KushalP
Created April 5, 2010 21:57
Show Gist options
  • Save KushalP/356952 to your computer and use it in GitHub Desktop.
Save KushalP/356952 to your computer and use it in GitHub Desktop.
# A recursive factorial method
import math
def my_factorial1(n):
return math.factorial(n)
def my_factorial2(n):
z = 1
if n > 1:
z = n * factorial(n - 1)
return z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment