

from __future__ import annotations

def 	A       (     snake_case__		,				snake_case__ = None		,				snake_case__ = None    ):




			'''simple docstring'''


			if start is None:
						SCREAMING_SNAKE_CASE__								=      0

			if end is None:
						SCREAMING_SNAKE_CASE__								=      len(snake_case__    ) - 1

			if start >= end:
						return

			SCREAMING_SNAKE_CASE__								=      (start + end) // 2

			slowsort(snake_case__		,				snake_case__		,				snake_case__    )
			slowsort(snake_case__		,				mid + 1		,				snake_case__    )

			if sequence[end] < sequence[mid]:
						SCREAMING_SNAKE_CASE__							,		SCREAMING_SNAKE_CASE__								=      sequence[mid], sequence[end]

			slowsort(snake_case__		,				snake_case__		,				end - 1    )


if __name__ == "__main__":
						from doctest import testmod

						testmod()





"""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()


