• Python program to find factorial of a number using recursion in python.
  • Algorithm to find factorial of a number using recursion function using python.

#1: Python program to find factorial of a given number using recursion

  1. #Factorial using recursion
  2. def fact(n):
  3.     if n==1:
  4.         return 1
  5.     else:
  6.         return n*fact(n-1)

  7. n=int(input("Enter the number: "))
  8. result=fact(n)
  9. print("Factorial of",n,"is", result)


  1. Enter the number: 6
  2. Factorial of 6 is 720

You Might like :
  1. Python try except else with example program
  2. Python finally block example with program
  3. Python try-except- else vs finally with example program
  4. Find factorial of a number without using recursion using python
  5. Python program to find factorial without recursion
  6. If statement in python example program
  7. Else statement in python with example program
  8. Types of operators in python
  9. python math operators
  10. python division operator
  11. Python modulo operator
  12. Python bitwise operators
  13. python comparison operators
  14. Logical operators in python
  15. Assignment operator in python
  16. Identity operator in python
  17. Python power operator
  18. Not equal operator in python
  19. python not operator
  20. python and operator
  21. python Ternary operator
  22. python string operations
  23. python string methods
  24. Spilt function in python
  25. Format function in python
  26. String reverse in python
  27. python tolower
  28. Remove spaces from string python
  29. Replace function in python
  30. Strip function in python
  31. Length of string python
  32. Concat python
  33. startswith python
  34. strftime python
  35. is numeric python
  36. is alpha python
  37. is digit python
  38. python substring

Instance Of Java

We will help you in learning.Please leave your comments and suggestions in comment section. if you any doubts please use search box provided right side. Search there for answers thank you.
Newer Post
Older Post

No comments

Leave a Reply

Select Menu