
'''simple docstring'''



def A (__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
						_lowerCAmelCase    		=					rate_per_annum / 12

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




def    lowerCAmelCase_  (		lowercase:				int	,       lowercase:				float	,       lowercase:				bool = False		)     ->					dict:







 '''simple docstring'''
 _UpperCamelCase:  dict    						=			{i: [] for i in range(lowercase		)}

 # if probability is greater or equal than 1, then generate a complete graph
 if probability >= 1:
  return complete_graph(lowercase		)
 # if probability is lower or equal than 0, then return a graph without edges
 if probability <= 0:
  return graph

 # for each couple of nodes, add an edge from u to v
 # if the number randomly generated is greater than probability probability
 for i in range(lowercase		):
  for j in range(i + 1	,       lowercase		):
   if random.random() < probability:
    graph[i].append(lowercase		)
    if not directed:
     # if the graph is undirected, add an edge in from j to i, either
     graph[j].append(lowercase		)
 return graph




def    lowerCAmelCase_  (		lowercase:				int		)     ->					dict:







 '''simple docstring'''
 return {
     i: [j for j in range(lowercase		) if i != j] for i in range(lowercase		)
 }


if __name__ == "__main__":
  import doctest

  doctest.testmod()