input: Write a function to understand recursion in Python using a factorial calculation as an example. The function should take an integer as input and return the factorial of that number through recursion. If the input number is 1, return 1. For other numbers, return the number multiplied by the factorial of the number minus one.
  
  assert factorial(5) == 120
  assert factorial(1) == 1
  assert factorial(3) == 6
  assert factorial(0) == None
  assert factorial(-1) == None
output: def factorial(n):
      if n == 1:
          return 1
      elif n < 1:
          return None
      else:
          return n * factorial(n - 1)