"""simple docstring"""






def   a_						(					lowerCamelCase       ):
				if not nums:  # Makes sure that the list is not empty
								raise ValueError('List is empty'       )

				UpperCAmelCase__             =							sum(lowerCamelCase       ) / len(lowerCamelCase       )  # Calculate the average
				return sum(abs(x - average       ) for x in nums       ) / len(lowerCamelCase       )


if __name__ == "__main__":
						import doctest

						doctest.testmod()




"""simple docstring"""






import math



def   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				if (
				    not isinstance(lowerCamelCase					,			(int, float)       )
				    or power_factor < -1
				    or power_factor > 1
				):
								raise ValueError('power_factor must be a valid float value between -1 and 1.'       )
				return apparent_power * power_factor



def   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				if (
				    not isinstance(lowerCamelCase					,			(int, float)       )
				    or power_factor < -1
				    or power_factor > 1
				):
								raise ValueError('power_factor must be a valid float value between -1 and 1.'       )
				return apparent_power * math.sqrt(1 - power_factor**2       )


if __name__ == "__main__":
						import doctest

						doctest.testmod()



