Skip to content

Instantly share code, notes, and snippets.

@esenthil2018
Created January 17, 2022 08:02
Show Gist options
  • Save esenthil2018/9ce36292c6b6ae08c1694a6f9963f53a to your computer and use it in GitHub Desktop.
Save esenthil2018/9ce36292c6b6ae08c1694a6f9963f53a to your computer and use it in GitHub Desktop.
def factor(n):
print('Factor{0}!'.format(n))
return 1 if n < 2 else n * factor(n-1)
factor(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment