Skip to content

Instantly share code, notes, and snippets.

@dmackinnon1
Created January 26, 2021 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmackinnon1/8a5b25bab7a7ce4a3800b757157243f1 to your computer and use it in GitHub Desktop.
Save dmackinnon1/8a5b25bab7a7ce4a3800b757157243f1 to your computer and use it in GitHub Desktop.
a simple python example
# be nice with this simple example:
# only positive integers pls.
def fact(x):
if x == 1:
return x
else:
return x*fact(x-1)
a = 4
print ("The factorial of " + str(a)
+ " is " + str(fact(4)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment