input: Write a function to develop a Python program to clearly understand the concept of recursion. The program should define a recursive function that calculates the factorial of a given number n, and then calculate the factorial of the number 5. If the given number is less than 1, return 1.
  
  def factorial(n):
     if n == 1:
        return 1
     else:
        return n * factorial(n - 1)
  
  result = factorial(5)
  print("Factorial of 5 is ", result)
  
  assert factorial(1)==1
  assert factorial(5)==120
  assert factorial(3)==6
  assert factorial(4)==24
  assert factorial(2)==2
output: def factorial(n):
     if n < 1:
        return 1
     elif n == 1:
        return 1
     else:
        return n * factorial(n - 1)