code: def notes_to_positions(notes, root):
      
      root_pos = note_to_val(root)
      current_pos = root_pos
      positions = []
      for note in notes:
          note_pos = note_to_val(note)
          if note_pos < current_pos:
              note_pos += 12 * ((current_pos - note_pos) // 12 + 1)
          positions.append(note_pos - root_pos)
          current_pos = note_pos
      return positions
docs: Get notes positions.
  
      ex) notes_to_positions(["C", "E", "G"], "C") -> [0, 4, 7]
  
      :param list[str] notes: list of notes
      :param str root: the root note
      :rtype: list[int]
      :return: list of note positions