code: def div(numerator, denominator):
      '''
      Returns numerator / denominator, but instead of a ZeroDivisionError:
          0 / 0 = 0.
          x / 0 = float('inf')
      This is not mathematically correct, but often practically OK.
  
      Args:
          numerator (float or int)
          denominator (float or int)
      Returns:
          (float)
      Raises:
          -
      '''
      try:
          return numerator/denominator
      except ZeroDivisionError:
          if numerator == 0:
              return 0.
          elif denominator == 0:
              return float('inf')
  #            return None
          else:
              return numerator/denominatof div(numerator, denominator):
      '''
      Returns numerator / denominator, but instead of a ZeroDivisionError:
          0 / 0 = 0.
          x / 0 = float('inf')
      This is not mathematically correct, but often practically OK.
  
      Args:
          numerator (float or int)
          denominator (float or int)
      Returns:
          (float)
      Raises:
          -
      '''
      try:
          return numerator/denominator
      except ZeroDivisionError:
          if numerator == 0:
              return 0.
          elif denominator == 0:
              return float('inf')
  #            return None
          else:
              return numerator/denominator
docs: Returns numerator / denominator, but instead of a ZeroDivisionError:
          0 / 0 = 0.
          x / 0 = float('inf')
      This is not mathematically correct, but often practically OK.
  
      Args:
          numerator (float or int)
          denominator (float or int)
      Returns:
          (float)
      Raises:
          -