🏠 Startseite
Vergleiche
📊 Alle Benchmarks 🦖 Dinosaurier v1 🦖 Dinosaurier v2 ✅ To-Do-Listen-Apps 🎨 Kreative freie Seiten 🎯 FSACB - Ultimatives Showcase 🌍 Übersetzungs-Benchmark
Modelle
🏆 Top 10 Modelle 🆓 Kostenlose Modelle 📋 Alle Modelle ⚙️ Kilo Code
Ressourcen
💬 Prompt-Bibliothek 📖 KI-Glossar 🔗 Nützliche Links
advanced

Debug Python Code Logic

#python #coding #debugging

Identify and fix a logical error in a code snippet.

Analyze the following Python code snippet designed to calculate the factorial of a number. Identify why it returns zero for the input 5 and provide the corrected code: def factorial(n): result = 0; for i in range(1, n+1): result *= i; return result