input: Write a function to understand recursion in Python by defining a recursive function to calculate the factorial of a number. Given a number n, the function should return its factorial. If the number is 1, the function should return 1. If the number is greater than 1, it should recursively multiply the number by the factorial of the number minus one.
  
  def factorial(n):
     if n == 1:
        return 1
     else:
        return n * factorial(n - 1)
  
  # Example assertion
  assert factorial(5) == 120
  assert factorial(1) == 1
  assert factorial(3) == 6
  assert factorial(0) == 1  # Assuming factorial of 0 to be 1
  assert factorial(-1) == None  # Assuming factorial of negative numbers to be None
  
  # Expected outputs:
  # Factorial of 5 is 120
  # Factorial of 1 is 1
  # Factorial of 3 is 6
  # Factorial of 0 is 1
  # Factorial of -1 is None
output: def factorial(n):
     if n == 0 or n == 1:
        return 1
     elif n < 0:
        return None
     else:
        return n * factorial(n - 1)