input: Write a function to compute the factorial of a given integer. If the given integer is non-negative, the function should return the factorial of the number. If the given integer is negative, the function should return None.
  def factorial(num):
      if num < 0:
          return None
      elif num == 0 or num == 1:
          return 1
      else:
          return num * factorial(num - 1)
  
  assert factorial(7) == 5040
  assert factorial(0) == 1
  assert factorial(-1) == None
  assert factorial(4) == 24
output: def factorial(num):
      if num < 0:
          return None
      elif num == 0 or num == 1:
          return 1
      else:
          return num * factorial(num - 1)