Intermediate
Python Code Debugger
Identify and fix a logical error in a Python loop.
📝 Prompt Content
Here is a Python function intended to return the sum of all even numbers in a list, but it is returning zero instead. Please identify the bug and provide the corrected code. def sum_even(numbers): total = 0 for n in numbers: if n % 2 == 0: total = n return total