Quotes help make search much faster. Example: "Practice Makes Perfect"
Wednesday, November 28, 2012
Codecademy: Arbitrary number of arguments
#sample solution
m = 5
n = 13
#function goes here
def myFun(*x): sum = 0 for index in range(0,len(x)): sum = sum + x[index] return sum
print myFun(m,n)
print myFun(1,2,3,4,5,6,7,8,9,10)
No comments:
Post a Comment