





"""simple docstring"""






def      lowercase__ (					lowerCAmelCase__   :			float							,			lowerCAmelCase__   :			float							,			lowerCAmelCase__   :			int			)    ->			float:



			'''simple docstring'''
			if principal <= 0:
						raise Exception("Principal borrowed must be > 0"			)
			if rate_per_annum < 0:
						raise Exception("Rate of interest must be >= 0"			)
			if years_to_repay <= 0 or not isinstance(lowerCAmelCase__							,			lowerCAmelCase__			):
						raise Exception("Years to repay must be an integer > 0"			)

			# Yearly rate is divided by 12 to get monthly rate
			a__  :	List[str]		 =			rate_per_annum / 1_2

			# Years to repay is multiplied by 12 to get number of payments as payment is monthly
			a__  :	Optional[int]		 =			years_to_repay * 1_2

			return (
			    principal
			    * rate_per_month
			    * (1 + rate_per_month) ** number_of_payments
			    / ((1 + rate_per_month) ** number_of_payments - 1)
			)


if __name__ == "__main__":
		import doctest

		doctest.testmod()






"""simple docstring"""






from maths.is_square_free import is_square_free
from maths.prime_factors import prime_factors






def      lowercase__ (					lowerCAmelCase__   :			int			)    ->			int:



			'''simple docstring'''
			a__  :	Tuple		 =			prime_factors(lowerCAmelCase__			)
			if is_square_free(lowerCAmelCase__			):
						return -1 if len(lowerCAmelCase__			) % 2 else 1
			return 0


if __name__ == "__main__":
		import doctest

		doctest.testmod()