





def A_     (		A__    )  ->		str:
							a__						:     Any			=    []
							a__						:     Tuple			=    set({'(', '[', '{'}    )
							a__						:     Union[str, Any]			=    set({')', ']', '}'}    )
							a__						:     List[str]			=    {'{': '}', '[': ']', '(': ')'}

							for i in range(len(SCREAMING_SNAKE_CASE_    )    ):
														if s[i] in open_brackets:
																					stack.append(s[i]    )

														elif s[i] in closed_brackets and (
														    len(SCREAMING_SNAKE_CASE_    ) == 0 or (len(SCREAMING_SNAKE_CASE_    ) > 0 and open_to_closed[stack.pop()] != s[i])
														):
																					return False

							return len(SCREAMING_SNAKE_CASE_    ) == 0



def A_     (		)  ->		Tuple:
							a__						:     List[str]			=    input('Enter sequence of brackets: '    )
							if is_balanced(SCREAMING_SNAKE_CASE_    ):
														print(SCREAMING_SNAKE_CASE_		,				'is balanced'    )
							else:
														print(SCREAMING_SNAKE_CASE_		,				'is not balanced'    )


if __name__ == "__main__":
				main()









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

       # Yearly rate is divided by 12 to get monthly rate
       a__						:     str			=    rate_per_annum / 12

       # Years to repay is multiplied by 12 to get number of payments as payment is monthly
       a__						:     List[Any]			=    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()


