Programming Languages
Python
Subjective
Sep 30, 2025
Write a Python function to find the factorial of a number using recursion.
Detailed Explanation
def factorial(n):\n if n == 0 or n == 1:\n return 1\n return n * factorial(n - 1)\n\n# Usage: factorial(5) returns 120
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts