
def 		UpperCamelCase						(   lowercase_ )		->						list:


  '''simple docstring'''






  for i in range(len(lowercase_ ) - 1			,			0			,			-1 ):
    lowercase__	: Union[str, Any]     		=   False

    for j in range(lowercase_			,			0			,			-1 ):
      if unsorted[j] < unsorted[j - 1]:
        lowercase__		,     lowercase__	: Tuple     		=   unsorted[j - 1], unsorted[j]
        lowercase__	: str     		=   True

    for j in range(lowercase_ ):
      if unsorted[j] > unsorted[j + 1]:
        lowercase__		,     lowercase__	: List[Any]     		=   unsorted[j + 1], unsorted[j]
        lowercase__	: Dict     		=   True

    if not swapped:
      break
  return unsorted


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     lowerCamelCase__     :		Optional[int]        = input("""Enter numbers separated by a comma:\n""").strip()
     lowerCamelCase__     :		Dict        = [int(item) for item in user_input.split(""",""")]
     print(f'''{cocktail_shaker_sort(unsorted) = }''')








def 		UpperCamelCase						(   lowercase_ )		->						float:


  '''simple docstring'''






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

  lowercase__	: int     		=   sum(lowercase_ ) / len(lowercase_ )  # Calculate the average
  return sum(abs(x - average ) for x in nums ) / len(lowercase_ )


if __name__ == "__main__":
     import doctest

     doctest.testmod()






