Skip to content

Instantly share code, notes, and snippets.

@zGrav
Created October 9, 2017 19:45
Show Gist options
  • Save zGrav/fb23b321e22142d4245bdc60b5ba429c to your computer and use it in GitHub Desktop.
Save zGrav/fb23b321e22142d4245bdc60b5ba429c to your computer and use it in GitHub Desktop.
def f(n):
f.count += 1
if n == 1:
return 1
else:
return n * f(n-1)
f.count = 0;
print f(5)
print f.count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment