whats wrong with my code? def product(i): f = 0 for e in i: f.append(e) f.append(*) return f
your code is creating a list with the elements in i witn an * in between them.
You are supposed to multiply all the elements.
you should get
try making your code to multiply each element in the list
Hi, texcoder38436 explained why.
But here is the actual code if you are stuck:
def product(lista): total = 1 for item in lista: total *= int(item) return total
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.