Skip to content

Instantly share code, notes, and snippets.

@vontell
Created February 3, 2016 16:47
Show Gist options
  • Save vontell/efbfd33228bb02ff978c to your computer and use it in GitHub Desktop.
Save vontell/efbfd33228bb02ff978c to your computer and use it in GitHub Desktop.
data = [ 2, 4, 6 ]
total = 0
average = 0
n = 0
for value in data:
n += 1
total += value
average = total / n
print "average:", average
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment