Skip to content

Instantly share code, notes, and snippets.

@kenmanheimer
Last active February 14, 2016 23:57
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 kenmanheimer/cdeb6c97c18adbd1fceb to your computer and use it in GitHub Desktop.
Save kenmanheimer/cdeb6c97c18adbd1fceb to your computer and use it in GitHub Desktop.
def g(n):
if n == 1:
return 4
elif n < 1:
raise ArithmeticError, "g can't do negative numbers"
else:
return g(n-1) * -3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment