

"""simple docstring"""




from __future__ import annotations

def 	A       (     snake_case__		,				snake_case__    ):




			'''simple docstring'''


			SCREAMING_SNAKE_CASE__								=      0
			SCREAMING_SNAKE_CASE__								=      len(snake_case__    ) - 1

			while i < j:
						if nums[i] + nums[j] == target:
									return [i, j]
						elif nums[i] + nums[j] < target:
									SCREAMING_SNAKE_CASE__								=      i + 1
						else:
									SCREAMING_SNAKE_CASE__								=      j - 1

			return []


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						print(F'{two_pointer([2, 7, 11, 15], 9) = }')





"""simple docstring"""




def 	A       (     snake_case__    ):




			'''simple docstring'''


			if not nums:  # Makes sure that the list is not empty
						raise ValueError("""List is empty"""    )

			SCREAMING_SNAKE_CASE__								=      sum(snake_case__    ) / len(snake_case__    )  # Calculate the average
			return sum(abs(x - average    ) for x in nums    ) / len(snake_case__    )


if __name__ == "__main__":
						import doctest

						doctest.testmod()


