

"""simple docstring"""





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

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


if __name__ == "__main__":
							import doctest

							doctest.testmod()







"""simple docstring"""





def     __SCREAMING_SNAKE_CASE    ( A_		,	A_					):
	if number < 0 or shift_amount < 0:
		raise ValueError('''both inputs must be positive integers'''					)

	lowerCAmelCase__      :		int    							=      str(bin(A_					)					)
	binary_number += "0" * shift_amount
	return binary_number

def     __SCREAMING_SNAKE_CASE    ( A_		,	A_					):
	if number < 0 or shift_amount < 0:
		raise ValueError('''both inputs must be positive integers'''					)

	lowerCAmelCase__      :		Any    							=      str(bin(A_					)					)[2:]
	if shift_amount >= len(A_					):
		return "0b0"
	lowerCAmelCase__      :		Tuple    							=      binary_number[: len(A_					) - shift_amount]
	return "0b" + shifted_binary_number

def     __SCREAMING_SNAKE_CASE    ( A_		,	A_					):
	if number >= 0:  # Get binary representation of positive number
		lowerCAmelCase__      :		Union[str, Any]    							=      '''0''' + str(bin(A_					)					).strip('''-'''					)[2:]
	else:  # Get binary (2's complement) representation of negative number
		lowerCAmelCase__      :		Optional[Any]    							=      len(bin(A_					)[3:]					)  # Find 2's complement of number
		lowerCAmelCase__      :		Optional[int]    							=      bin(abs(A_					) - (1 << binary_number_length)					)[3:]
		lowerCAmelCase__      :		int    							=      (
		    '''1''' + '''0''' * (binary_number_length - len(A_					)) + binary_number
		)

	if shift_amount >= len(A_					):
		return "0b" + binary_number[0] * len(A_					)
	return (
	    "0b"
	    + binary_number[0] * shift_amount
	    + binary_number[: len(A_					) - shift_amount]
	)


if __name__ == "__main__":
							import doctest

							doctest.testmod()




