🏠 Beranda
Benchmark
📊 Semua Benchmark 🦖 Dinosaurus v1 🦖 Dinosaurus v2 ✅ Aplikasi To-Do List 🎨 Halaman Bebas Kreatif 🎯 FSACB - Showcase Utama 🌍 Benchmark Terjemahan
Model
🏆 Top 10 Model 🆓 Model Gratis 📋 Semua Model ⚙️ Kilo Code
Sumber Daya
💬 Perpustakaan Prompt 📖 Glosarium AI 🔗 Tautan Berguna
medium

Debug a Python Script

#coding #python #debugging

Identify and fix logical errors in a provided code snippet.

Review the following Python code snippet intended to calculate the factorial of a number. Identify why it returns the wrong result for n=0 and provide the corrected code. result = 1 for i in range(1, n): result *= i return result