input: Write a python function to divide 42 by a given number and handle division by zero exception.
  assert spam(2) == 21
  assert spam(12) == 3.5
  assert spam(0) == None
output: def spam(n):
      try:
          return 42 / n
      except ZeroDivisionError:
          return None