






'''simple docstring'''





def 			A__							(      _a  :					List[Any]		,  _a  :					Tuple		,  _a  :					Any	):





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

 # Yearly rate is divided by 12 to get monthly rate
 snake_case__  :    List[str]							       =rate_per_annum / 12

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













__lowerCamelCase	:		dict[str, float]										=   {
    "km/h": 1.0,
    "m/s": 3.6,
    "mph": 1.60_93_44,
    "knot": 1.8_52,
}

__lowerCamelCase	:		dict[str, float]										=   {
    "km/h": 1.0,
    "m/s": 0.2_77_77_77_78,
    "mph": 0.6_21_37_11_92,
    "knot": 0.5_39_95_68_03,
}







def 			A__							(      _a  :					float		,  _a  :					str		,  _a  :					str	):





 '''simple docstring'''







 if unit_to not in speed_chart or unit_from not in speed_chart_inverse:
  snake_case__  :    Tuple							       =(
      f"Incorrect 'from_type' or 'to_type' value: {unit_from!r}, {unit_to!r}\n"
      f"Valid values are: {', '.join(_a	)}"
  )
  raise ValueError(_a	)
 return round(speed * speed_chart[unit_from] * speed_chart_inverse[unit_to]		,  3	)


if __name__ == "__main__":
       import doctest

       doctest.testmod()





