input: Write a function to clearly understand the concept of recursion in Python. Define a recursive function to calculate the factorial of a given number. If the input number is 1, return 1. Otherwise, return the product of the number and the factorial of its predecessor. Finally, calculate the factorial of number 5 and print the result.
  assert factorial(5)==120
  assert factorial(1)==1
  assert factorial(3)==6
  assert factorial(0)==1  # Factorial of 0 is typically defined as 1
  assert factorial(-1)==None  # Factorial of negative numbers is not defined
output: def factorial(n):
      if n == 0 or n == 1:
          return 1
      elif n < 0:
          return None
      else:
          return n * factorial(n - 1)