🏠 Inicio
Pruebas de rendimiento
📊 Todos los benchmarks 🦖 Dinosaurio v1 🦖 Dinosaurio v2 ✅ Aplicaciones To-Do List 🎨 Páginas libres creativas 🎯 FSACB - Showcase definitivo 🌍 Benchmark de traducción
Modelos
🏆 Top 10 modelos 🆓 Modelos gratuitos 📋 Todos los modelos ⚙️ Kilo Code
Recursos
💬 Biblioteca de prompts 📖 Glosario de IA 🔗 Enlaces útiles
Intermediate

Python Code Debugger

#python #debugging #code

Identify and fix a logical error in a Python loop.

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