intermediate
Explain a Complex Code Snippet
Break down a specific piece of code to explain its functionality, logic, and how it processes data step-by-step.
📝 Prompt Content
Explain what the following Python function does line by line: def calculate_factorial(n): if n == 0: return 1 else: return n * calculate_factorial(n-1). Describe the base case and the recursive step in simple terms.