def product(*L):
acc=1
for x in L:
acc=acc*x
return acc
今天没做出来 这个还是参考别人的0 0
n=len(L)
while x<=n-1:
acc=acc*L[x]*L[x+1]
x=x+1
自己写的是这个 ,一直提示;tuple' object is not callable
Sign in to make a reply
不要醉酒
def product(*L):
acc=1
for x in L:
acc=acc*x
return acc
今天没做出来 这个还是参考别人的0 0
def product(*L):
n=len(L)
acc=1
while x<=n-1:
acc=acc*L[x]*L[x+1]
x=x+1
return acc
自己写的是这个 ,一直提示;tuple' object is not callable