






def       lowercase__	(					A_:						float  ,      A_:						float  ,      A_:						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(A_  ,      A_		):
              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()












class 					SCREAMING_SNAKE_CASE_  :
       """simple docstring"""


       def __init__(				self	:List[Any]):



          """simple docstring"""

          _lowercase              ={}





       def 				UpperCamelCase__						(				self	:str):



          """simple docstring"""

          print(self.vertex)
          for i in self.vertex:
             print(snake_case,      ' -> ',      ' -> '.join([str(snake_case) for j in self.vertex[i]]))





       def 				UpperCamelCase__						(				self	:Any,      snake_case	:int,      snake_case	:int):



          """simple docstring"""

          if from_vertex in self.vertex:
             self.vertex[from_vertex].append(snake_case)
          else:
             # else make a new vertex
             _lowercase              =[to_vertex]





       def 				UpperCamelCase__						(				self	:Union[str, Any]):



          """simple docstring"""

          _lowercase              =[False] * len(self.vertex)

          # call the recursive helper function
          for i in range(len(self.vertex)):
             if not visited[i]:
                self.dfs_recursive(snake_case,      snake_case)





       def 				UpperCamelCase__						(				self	:List[str],      snake_case	:int,      snake_case	:list):



          """simple docstring"""

          _lowercase              =True

          print(snake_case,      end=' ')

          # Recur for all the vertices that are adjacent to this node
          for i in self.vertex:
             if not visited[i]:
                self.dfs_recursive(snake_case,      snake_case)


if __name__ == "__main__":
    _SCREAMING_SNAKE_CASE   =  Graph()
    g.add_edge(0, 1)
    g.add_edge(0, 2)
    g.add_edge(1, 2)
    g.add_edge(2, 0)
    g.add_edge(2, 3)
    g.add_edge(3, 3)

    g.print_graph()
    print("DFS:")
    g.dfs()

    # OUTPUT:
    # 0  ->  1 -> 2
    # 1  ->  2
    # 2  ->  0 -> 3
    # 3  ->  3
    # DFS:
    #  0 1 2 3


