input: Write a function to define a recursive function in Python that calculates the factorial of a given number. If the given number is 1, return 1. Otherwise, return the number multiplied by the factorial of the number minus one. Print the factorial of the number 5.
  assert factorial(1)==1
  assert factorial(5)==120
output: def factorial(n):
      if n == 1:
          return 1
      else:
          return n * factorial(n - 1)