n = [3, 5, 7]

def total(numbers):
result = 0
for i in range(len(numbers)):
result = 0 + numbers[i]
return result
print total([0,3,6])

then emerged 6 ??? why not 9???
plz help


Sometimes you just got to read what your code says, because the explanation is right there, and there’s nothing subtle about it

You can also use print statements to print out information from your program while it runs


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.