





def 		A_    (					_lowerCAmelCase							,       _lowerCAmelCase							,       _lowerCAmelCase					)						->			Union[str, Any]:



	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
	UpperCamelCase     : int	     =       rate_per_annum / 12

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







from __future__ import annotations



def 		A_    (					_lowerCAmelCase							,       _lowerCAmelCase					)						->			list[str]:
 if partitions <= 0:
  raise ValueError("partitions must be a positive number!"					)
 if partitions > number_of_bytes:
  raise ValueError("partitions can not > number_of_bytes!"					)
 UpperCamelCase     : str	     =       number_of_bytes // partitions
 UpperCamelCase     : List[Any]	     =       []
 for i in range(_lowerCAmelCase					):
  UpperCamelCase     : Optional[Any]	     =       i * bytes_per_partition + 1
  UpperCamelCase     : Any	     =       (
      number_of_bytes if i == partitions - 1 else (i + 1) * bytes_per_partition
  )
  allocation_list.append(F"""{start_bytes}-{end_bytes}"""					)
 return allocation_list


if __name__ == "__main__":
    import doctest

    doctest.testmod()
