def findPayment(loan:float, rate:float, months:int) -> float:
  """Assumes loan and rate are floats, while months is int.

  Eg: rate = 0.07
  
  Returns the monthly payment required to pay."""

  return loan*((rate*(1+rate)**months)/((1+rate)**months - 1))