🏠 Strona Główna
Benchmarki
📊 Wszystkie benchmarki 🦖 Dinozaur v1 🦖 Dinozaur v2 ✅ Aplikacje To-Do List 🎨 Kreatywne wolne strony 🎯 FSACB - Ostateczny pokaz 🌍 Benchmark tłumaczeń
Modele
🏆 Top 10 modeli 🆓 Darmowe modele 📋 Wszystkie modele ⚙️ Kilo Code
Zasoby
💬 Biblioteka promptów 📖 Słownik AI 🔗 Przydatne linki
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