def PV(fv:float, c:float, r:float, n:float, m = 1):
  """
  PV(): A function to calculate Present Value.

  :param fv: Future Value
  :type fv: float
  :param c: Coupon rate (in decimals eg: 0.05 for 5%)
  :type c: float
  :param r: Rate of Interest/Discount Rate (in decimals eg: 0.05 for 5%)
  :type r: float
  :param n: Number of Years
  :type n: float
  :param m: Frequency of Interest Calculation (eg: 2 for Semi-annually), defaults to 1.
  :type m: float
  :return: float, None for -ve values of m.
  :rtype: float

  --------

  """
  if(m<=0):return None
  pv1,pv2=0,0
  pv1 = fv*(c/m)*(1-(1/(1+r/m)**(m*n)))/(r/m)
  pv2=fv/((1+r/m)**(m*n))
  return pv1+pv2