Skip to content

Instantly share code, notes, and snippets.

@bryanyang0528
Created November 17, 2014 16:50
Show Gist options
  • Save bryanyang0528/f3f889f0227f7f92c98f to your computer and use it in GitHub Desktop.
Save bryanyang0528/f3f889f0227f7f92c98f to your computer and use it in GitHub Desktop.
sum.py
sdef sumx(x):
total = 0
for i in x:
total =total + i
return total
sumx([1,2,3,4,5])
#15
sumx([1.2,2,3,4,5])
#15.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment