input: Write a function to calculate the dot product of two lists of the same length. If the lists are not of the same length, raise an exception.
  
  def dot_product(list1, list2):
      if len(list1) != len(list2):
          raise ValueError("Lists must have the same length")
      product = 0
      for i in range(len(list1)):
          product += list1[i] * list2[i]
      return product
  assert dot_product([1, 2], [3, 4])==11
  assert dot_product([1, 0], [0, 1])==0
  assert dot_product([5, 10], [2, 3])==35
  
output: def dot_product(list1, list2):
      if len(list1) != len(list2):
          raise ValueError("Lists must have the same length")
      product = 0
      for i in range(len(list1)):
          product += list1[i] * list2[i]
      return product