Skip to content

Instantly share code, notes, and snippets.

@Fergmux
Created February 11, 2014 15:42
Show Gist options
  • Save Fergmux/8937366 to your computer and use it in GitHub Desktop.
Save Fergmux/8937366 to your computer and use it in GitHub Desktop.
def factorial(x):
n = range(1, x+1)
total = 1
for y in n:
total *= y
return total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment