




def  SCREAMING_SNAKE_CASE     (	__UpperCamelCase      :						Optional[Any]	,					__UpperCamelCase      :						Union[str, Any]	,					__UpperCamelCase      :						List[Any]				)  ->							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
    UpperCAmelCase_										=					rate_per_annum / 12

    # Years to repay is multiplied by 12 to get number of payments as payment is monthly
    UpperCAmelCase_										=					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()











import numpy as np




def  SCREAMING_SNAKE_CASE     (	__UpperCamelCase      :						np.array				)  ->							np.array:
    return (2 / (1 + np.exp(-2 * vector				))) - 1


if __name__ == "__main__":
 import doctest

 doctest.testmod()





