Python Program to Find Factorial of Number Using Recursion
Write Python Program to Find Factorial of Number Using Recursion
# Write Python Program to Find Factorial of Number Using Recursion def factorial(n): result = 1 if(n <= 1): result = 1 else: result = n * factorial(n - 1) return result n = 6 fact = factorial(n) print(f'{n}! = {fact}')
Output:
6! = 720