input: 
  def dot_product(list1, list2):
      """
      Calculate the dot product of two lists.
      >>> dot_product([1,2], [3,4])
      11
      >>> dot_product([0,1,2], [1,0,4])
      8
      >>> dot_product([1], [3])
      3
      """
      product = 0
      for i in range(len(list1)):
          product += (list1[i] * list2[i])
      return product
  
output:     if len(list1) != len(list2):
          raise ValueError("The two lists must have the same length.")