def pmt(self): """ Calculate the loan payment for the loan. Called from the __init__(). Args: self.rate: periodic interest rate (i.e. interest rate / period) self.periods*(self.term+1): total number of compounding periods self.present_value: the loan amount Returns: self.payment: amount of each payment (float) """ self.payment = Amortizer.pmt(self.rate, self.periods*(self.term+1), self.present_value)