"""simple docstring"""







def   __UpperCAmelCase    (   UpperCAmelCase_   :    list[int]  )							->      float:

	'''simple docstring'''





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

	__snake_case      :							Dict						=			sum(UpperCAmelCase_  ) / len(UpperCAmelCase_  )  # Calculate the average
	return sum(abs(x - average  ) for x in nums  ) / len(UpperCAmelCase_  )


if __name__ == "__main__":
	import doctest

	doctest.testmod()






"""simple docstring"""







from __future__ import annotations

from math import pow, sqrt
def   __UpperCAmelCase    (   UpperCAmelCase_   :    float      ,							UpperCAmelCase_   :    float      ,							UpperCAmelCase_   :    float  )							->      dict[str, float]:

	'''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()





