Intermediate
Python Debugging Assistant
Identify and fix a logical error in a Python code snippet.
📝 프롬프트 내용
Analyze the following Python code snippet designed to calculate the factorial of a number. Identify the logical error that causes a recursion error for large inputs and provide the corrected code block along with an explanation of the fix.