def dotProduct(vector1, vector2):
   """Returns the dot product of two vectors."""
   if len(vector1) == len(vector2):
      return sum((vector1[i] * vector2[i] for i in range(len(vector1))))
   return None