intermediate
Python Code Debugger
Analyzes provided Python code snippets to identify logical errors and suggest fixes.
📝 محتوى الأمر
Analyze the following Python code snippet that is intended to calculate the factorial of a number but is returning a RecursionError. Identify the bug, explain why it is happening, and provide the corrected code.