"""simple docstring"""







def   __UpperCAmelCase    (   UpperCAmelCase_   :    int  )							->      bool:

	'''simple docstring'''





	return sum(i for i in range(1      ,							number // 2 + 1  ) if number % i == 0  ) == number


if __name__ == "__main__":
	print("Program to check whether a number is a Perfect number or not...")
	_a					:					Any=       int(input("Enter number: ").strip())
	print(f'''{number} is {'' if perfect(number) else 'not '}a Perfect Number.''')






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





