Skip to content

Instantly share code, notes, and snippets.

@Svastikkka
Created June 12, 2020 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Svastikkka/436fcdf2dd968d5e39e4c2929e22721b to your computer and use it in GitHub Desktop.
Save Svastikkka/436fcdf2dd968d5e39e4c2929e22721b to your computer and use it in GitHub Desktop.
num=input()
x=[int(i) for i in num]
e=0
o=0
for i in range(0,len(x)):
if x[i]%2==0:
e=e+x[i]
else:
o=o+x[i]
print(e,o)
@Svastikkka
Copy link
Author

Sum of even & odd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment