medium
Debug Python Code Snippet
Identify and fix a logical error in a provided Python script.
📝 프롬프트 내용
Analyze the following Python code intended to calculate the factorial of a number using recursion. Identify the logic error that causes it to fail for input 0, provide the corrected code block, and briefly explain why the original code failed.