Created
July 14, 2020 08:20
-
-
Save aahnik/cc33e8a6b4a94ac5354410877d0a49e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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