






def 					snake_case_						(   lowerCAmelCase_				:  float				,				lowerCAmelCase_				:  float				,				lowerCAmelCase_				:  int					):
							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
							__lowercase					:							List[Any]			=   rate_per_annum / 12

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







lowerCamelCase       :       Tuple        =				{'''a''': ['''c''', '''b'''], '''b''': ['''d''', '''e'''], '''c''': [], '''d''': [], '''e''': []}
lowerCamelCase       :       int        =				['''a''', '''b''', '''c''', '''d''', '''e''']
def 					snake_case_						(   lowerCAmelCase_				:  Optional[int]				,				lowerCAmelCase_				:  str				,				lowerCAmelCase_				:  List[Any]					):
							__lowercase					:							Dict			=   start
							# add current to visited
							visited.append(lowerCAmelCase_					)
							__lowercase					:							Dict			=   edges[current]
							for neighbor in neighbors:
														# if neighbor not in visited, visit
														if neighbor not in visited:
																					__lowercase					:							List[Any]			=   topological_sort(lowerCAmelCase_				,				lowerCAmelCase_				,				lowerCAmelCase_					)
    # if all neighbors visited add current to sort
							sort.append(lowerCAmelCase_					)
							# if all vertices haven't been visited select a new one to visit
							if len(lowerCAmelCase_					) != len(lowerCAmelCase_					):
														for vertice in vertices:
																					if vertice not in visited:
																												__lowercase					:							Tuple			=   topological_sort(lowerCAmelCase_				,				lowerCAmelCase_				,				lowerCAmelCase_					)
    # return sort
							return sort


if __name__ == "__main__":
	lowerCamelCase       :       Any        =				topological_sort('''a''', [], [])
	print(sort)