

from __future__ import annotations





def       __lowerCamelCase			(				UpperCamelCase__   ):







							'''simple docstring'''






							snake_case_           =					0.00
							snake_case_           =					0
							for resistor in resistors:
														if resistor <= 0:
																					snake_case_           =					F'''Resistor at index {index} has a negative or zero value!'''
																					raise ValueError(UpperCamelCase__   )
														first_sum += 1 / float(UpperCamelCase__   )
														index += 1
							return 1 / first_sum





def       __lowerCamelCase			(				UpperCamelCase__   ):







							'''simple docstring'''






							snake_case_           =					0.00
							snake_case_           =					0
							for resistor in resistors:
														sum_r += resistor
														if resistor < 0:
																					snake_case_           =					F'''Resistor at index {index} has a negative value!'''
																					raise ValueError(UpperCamelCase__   )
														index += 1
							return sum_r


if __name__ == "__main__":
					import doctest

					doctest.testmod()







def       __lowerCamelCase			(				UpperCamelCase__   ):







							'''simple docstring'''






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

							snake_case_           =					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()




