


"""simple docstring"""




def        lowercase							(		lowerCAmelCase__ :     List[Any]    ,					lowerCAmelCase__ :     Optional[Any]    ,					lowerCAmelCase__ :     Tuple			) ->      float:

		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(__UpperCAmelCase    ,					__UpperCAmelCase			):
				raise Exception('''Years to repay must be an integer > 0'''			)

		# Yearly rate is divided by 12 to get monthly rate
		__a           =			rate_per_annum / 12

		# Years to repay is multiplied by 12 to get number of payments as payment is monthly
		__a           =			years_to_repay * 12

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

import math
from collections.abc import Callable


def 		__magic_name__    (	__UpperCAmelCase,      __UpperCAmelCase,      __UpperCAmelCase	)		->					float:

					'''simple docstring'''

					snake_case_									=				xa
					snake_case_									=				xa
					while True:
										if x_n == x_na or function(__UpperCAmelCase	) == function(__UpperCAmelCase	):
															raise ZeroDivisionError('''float division by zero, could not find root'''	)
										snake_case_									=				x_na - (
										    function(__UpperCAmelCase	) / ((function(__UpperCAmelCase	) - function(__UpperCAmelCase	)) / (x_na - x_n))
										)
										if abs(x_na - x_na	) < 10**-5:
															return x_na
										snake_case_									=				x_na
										snake_case_									=				x_na


def 		__magic_name__    (	__UpperCAmelCase	)		->					float:

					'''simple docstring'''

					return math.pow(__UpperCAmelCase,      3	) - (2 * x) - 5


if __name__ == "__main__":
							print(intersection(f, 3, 3.5))

