input: Write a function to implement a recursive function in Python that calculates the factorial of a given number. If the given number is 1, return 1. Otherwise, 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)
  
  assert factorial(3) == 6
  assert factorial(5) == 120
  assert factorial(0) is None
  assert factorial(-1) is None
  assert factorial(1) == 1
output: def factorial(n):
     if n == 1:
        return 1
     else:
        return n * factorial(n - 1)