Created
February 2, 2021 17:12
-
-
Save syedjafer/10afeeef5b0bd726f74c104bc4421c40 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 find_sum(a, b): | |
res = 0 | |
if( a < b ): | |
for item in range(a, b+1): | |
res += item | |
else: | |
for item in range(b, a+1): | |
res += item | |
return res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment