Quotes help make search much faster. Example: "Practice Makes Perfect"

Wednesday, November 28, 2012

Codecademy: Counting up the elements in a list of arbitrary size


#sample solution
# the course writer probably meant summing when he used the word counting


n = [3,5,7]
def myFun(numberList):
sum = 0
for number in numberList:
sum = sum + number
return sum
print myFun(n)

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts