






'''simple docstring'''




def       __lowercase		(    __lowercase ) ->		float:

      '''simple docstring'''


      return -num if num < 0 else num

def       __lowercase		(    __lowercase ) ->		int:

      '''simple docstring'''


      if len(__lowercase ) == 0:
            raise ValueError("abs_min() arg is an empty sequence" )
      _A      =			x[0]
      for i in x:
            if abs_val(__lowercase ) < abs_val(__lowercase ):
                  _A      =			i
      return j

def       __lowercase		(    __lowercase ) ->		int:

      '''simple docstring'''


      if len(__lowercase ) == 0:
            raise ValueError("abs_max() arg is an empty sequence" )
      _A      =			x[0]
      for i in x:
            if abs(__lowercase ) > abs(__lowercase ):
                  _A      =			i
      return j

def       __lowercase		(    __lowercase ) ->		int:

      '''simple docstring'''


      if len(__lowercase ) == 0:
            raise ValueError("abs_max_sort() arg is an empty sequence" )
      return sorted(__lowercase     ,						key=__lowercase )[-1]

def       __lowercase		(    ) ->		List[Any]:

      '''simple docstring'''


      assert abs_val(0 ) == 0
      assert abs_val(34 ) == 34
      assert abs_val(-1000_0000_0000 ) == 1000_0000_0000

      _A      =			[-3, -1, 2, -11]
      assert abs_max(__lowercase ) == -11
      assert abs_max_sort(__lowercase ) == -11
      assert abs_min(__lowercase ) == -1


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    test_abs_val()
    print(abs_val(-34))  # --> 34













'''simple docstring'''




def       __lowercase		(    __lowercase ) ->		int:

      '''simple docstring'''


      _A      =			str(__lowercase ).strip()
      if not bin_string:
            raise ValueError("Empty string was passed to the function" )
      _A      =			bin_string[0] == "-"
      if is_negative:
            _A      =			bin_string[1:]
      if not all(char in "01" for char in bin_string ):
            raise ValueError("Non-binary value was passed to the function" )
      _A      =			0
      for char in bin_string:
            _A      =			2 * decimal_number + int(__lowercase )
      return -decimal_number if is_negative else decimal_number


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

    testmod()





