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