🏠 Home
Benchmark
📊 Tutti i benchmark 🦖 Dinosauro v1 🦖 Dinosauro v2 ✅ App To-Do List 🎨 Pagine libere creative 🎯 FSACB - Ultimate Showcase 🌍 Benchmark traduzione
Modelli
🏆 Top 10 modelli 🆓 Modelli gratuiti 📋 Tutti i modelli ⚙️ Kilo Code
Risorse
💬 Libreria di prompt 📖 Glossario IA 🔗 Link utili
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