Skip to content

Instantly share code, notes, and snippets.

@aahnik
Created July 14, 2020 08:20
Show Gist options
  • Save aahnik/cc33e8a6b4a94ac5354410877d0a49e1 to your computer and use it in GitHub Desktop.
Save aahnik/cc33e8a6b4a94ac5354410877d0a49e1 to your computer and use it in GitHub Desktop.
def sum(n):
if n == 1:
return 1
else:
return n + sum(n+1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment