
'''simple docstring'''






def 		A_       (	_lowerCAmelCase   :    list							):



      """simple docstring"""




      for i in range(len(_lowerCAmelCase							) - 1				,	0				,	-1							):
            _lowerCamelCase				:   Tuple								=   False

            for j in range(_lowerCAmelCase				,	0				,	-1							):
                  if unsorted[j] < unsorted[j - 1]:
                        _lowerCamelCase						,		_lowerCamelCase				:   Dict								=   unsorted[j - 1], unsorted[j]
                        _lowerCamelCase				:   str								=   True

            for j in range(_lowerCAmelCase							):
                  if unsorted[j] > unsorted[j + 1]:
                        _lowerCamelCase						,		_lowerCamelCase				:   Dict								=   unsorted[j + 1], unsorted[j]
                        _lowerCamelCase				:   Optional[Any]								=   True

            if not swapped:
                  break
      return unsorted


if __name__ == "__main__":
 import doctest

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

'''simple docstring'''






def 		A_       (	_lowerCAmelCase   :    float							):



      """simple docstring"""




      return 10 - x * x







def 		A_       (	_lowerCAmelCase   :    float				,	_lowerCAmelCase   :    float							):



      """simple docstring"""




      if equation(_lowerCAmelCase							) * equation(_lowerCAmelCase							) >= 0:
            raise ValueError("Wrong space!"							)

      _lowerCamelCase				:   List[str]								=   a
      while (b - a) >= 0.0_1:
            # Find middle point
            _lowerCamelCase				:   Union[str, Any]								=   (a + b) / 2
            # Check if middle point is root
            if equation(_lowerCAmelCase							) == 0.0:
                  break
            # Decide the side to repeat the steps
            if equation(_lowerCAmelCase							) * equation(_lowerCAmelCase							) < 0:
                  _lowerCamelCase				:   Union[str, Any]								=   c
            else:
                  _lowerCamelCase				:   Any								=   c
      return c


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 print(bisection(-2, 5))
 print(bisection(0, 6))