



"""simple docstring"""




def 		__snake_case		(   SCREAMING_SNAKE_CASE__			:		float       )						->     float:





     '''simple docstring'''

     return -num if num < 0 else num

def 		__snake_case		(   SCREAMING_SNAKE_CASE__			:		list[int]       )						->     int:





     '''simple docstring'''

     if len(SCREAMING_SNAKE_CASE__       ) == 0:
          raise ValueError("abs_min() arg is an empty sequence"       )
     _UpperCAmelCase    :			int              =					x[0]
     for i in x:
          if abs_val(SCREAMING_SNAKE_CASE__       ) < abs_val(SCREAMING_SNAKE_CASE__       ):
               _UpperCAmelCase    :			List[str]              =					i
     return j

def 		__snake_case		(   SCREAMING_SNAKE_CASE__			:		list[int]       )						->     int:





     '''simple docstring'''

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

def 		__snake_case		(   SCREAMING_SNAKE_CASE__			:		list[int]       )						->     int:





     '''simple docstring'''

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

def 		__snake_case		(   )						->     Optional[Any]:





     '''simple docstring'''

     assert abs_val(0       ) == 0
     assert abs_val(34       ) == 34
     assert abs_val(-100_000_000_000       ) == 100_000_000_000

     _UpperCAmelCase    :			List[str]              =					[-3, -1, 2, -11]
     assert abs_max(SCREAMING_SNAKE_CASE__       ) == -11
     assert abs_max_sort(SCREAMING_SNAKE_CASE__       ) == -11
     assert abs_min(SCREAMING_SNAKE_CASE__       ) == -1


if __name__ == "__main__":
 import doctest

 doctest.testmod()

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





"""simple docstring"""




def 		__snake_case		(   SCREAMING_SNAKE_CASE__			:		list       )						->     bool:





     '''simple docstring'''

     if not isinstance(SCREAMING_SNAKE_CASE__		,						SCREAMING_SNAKE_CASE__       ):
          raise ValueError("Input series is not valid, valid series - [1, 2/3, 2]"       )
     if len(SCREAMING_SNAKE_CASE__       ) == 0:
          raise ValueError("Input list must be a non empty list"       )
     if len(SCREAMING_SNAKE_CASE__       ) == 1 and series[0] != 0:
          return True
     _UpperCAmelCase    :			Tuple              =					[]
     _UpperCAmelCase    :			Any              =					len(SCREAMING_SNAKE_CASE__       )
     for i in range(0		,						SCREAMING_SNAKE_CASE__       ):
          if series[i] == 0:
               raise ValueError("Input series cannot have 0 as an element"       )
          rec_series.append(1 / series[i]       )
     _UpperCAmelCase    :			Dict              =					rec_series[1] - rec_series[0]
     for index in range(2		,						SCREAMING_SNAKE_CASE__       ):
          if rec_series[index] - rec_series[index - 1] != common_diff:
               return False
     return True

def 		__snake_case		(   SCREAMING_SNAKE_CASE__			:		list       )						->     float:





     '''simple docstring'''

     if not isinstance(SCREAMING_SNAKE_CASE__		,						SCREAMING_SNAKE_CASE__       ):
          raise ValueError("Input series is not valid, valid series - [2, 4, 6]"       )
     if len(SCREAMING_SNAKE_CASE__       ) == 0:
          raise ValueError("Input list must be a non empty list"       )
     _UpperCAmelCase    :			Any              =					0
     for val in series:
          answer += 1 / val
     return len(SCREAMING_SNAKE_CASE__       ) / answer


if __name__ == "__main__":
 import doctest

 doctest.testmod()
