def 							UpperCAmelCase__(					__UpperCAmelCase			:     Union[str, Any]       ):



   if not isinstance(UpperCAmelCase__     ,				UpperCAmelCase__       ):
      raise ValueError('Input series is not valid, valid series - [2, 4, 6]'       )
   if len(UpperCAmelCase__       ) == 0:
      raise ValueError('Input list must be a non empty list'       )
   if len(UpperCAmelCase__       ) == 1:
      return True
   __snake_case   :			List[Any]										=						series[1] - series[0]
   for index in range(len(UpperCAmelCase__       ) - 1       ):
      if series[index + 1] - series[index] != common_diff:
         return False
   return True






def 							UpperCAmelCase__(					__UpperCAmelCase			:     int       ):



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


if __name__ == "__main__":
 import doctest

 doctest.testmod()








from __future__ import annotations

from math import pow, sqrt

def      __lowercase(						UpperCAmelCase__ , UpperCAmelCase__ , UpperCAmelCase__			):


      """simple docstring"""



      if (resistance, reactance, impedance).count(0			) != 1:
            raise ValueError("One and only one argument must be 0"			)
      if resistance == 0:
            return {"resistance": sqrt(pow(UpperCAmelCase__ , 2			) - pow(UpperCAmelCase__ , 2			)			)}
      elif reactance == 0:
            return {"reactance": sqrt(pow(UpperCAmelCase__ , 2			) - pow(UpperCAmelCase__ , 2			)			)}
      elif impedance == 0:
            return {"impedance": sqrt(pow(UpperCAmelCase__ , 2			) + pow(UpperCAmelCase__ , 2			)			)}
      else:
            raise ValueError("Exactly one argument must be 0"			)


if __name__ == "__main__":
     import doctest

     doctest.testmod()