





'''simple docstring'''




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







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


if __name__ == "__main__":
    import doctest

    doctest.testmod()












'''simple docstring'''




from __future__ import annotations







def _lowerCAmelCase     (      _lowerCAmelCase    )->     int:
 if not nums:
  return 0
 __UpperCAmelCase					=   nums[0]
 __UpperCAmelCase					=   0
 for num in nums[1:]:
  __UpperCAmelCase					,    __UpperCAmelCase					=   (
      max_excluding + num,
      max(_lowerCAmelCase       ,    _lowerCAmelCase    ),
  )
 return max(_lowerCAmelCase       ,    _lowerCAmelCase    )


if __name__ == "__main__":
    import doctest

    doctest.testmod()





