Skip to content

Instantly share code, notes, and snippets.

@syedjafer
Created February 2, 2021 17:12
Show Gist options
  • Save syedjafer/10afeeef5b0bd726f74c104bc4421c40 to your computer and use it in GitHub Desktop.
Save syedjafer/10afeeef5b0bd726f74c104bc4421c40 to your computer and use it in GitHub Desktop.
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