when i use the method1 (for number in numbers)- it's all ok,
but when i try to use method2 i have an error
Oops, try again. total([0, 3, 6]) returned 3 instead of 9
i want to try both methods
what i'm doing wrong?
n = [3, 5, 7] def total(numbers): result = 0 for number in range(len(numbers)): result += number return result print total(n)