figure contains the abstract class mortgage this class contains methods that are shared by each of the subclassesbut it is not intended to be instantiated directly the function findpayment at the top of the figure computes the size of the fixed monthly payment needed to pay off the loanincluding interestby the end of its term it does this using well-known closed-form expression this expression is not hard to derivebut it is lot easier to just look it up and more likely to be correct than one derived on the spot when your code incorporates formulas you have looked upmake sure thatyou have taken the formula from reputable source we looked at multiple reputable sourcesall of which contained equivalent formulas you fully understand the meaning of all the variables in the formula you test your implementation against examples taken from reputable sources after implementing this functionwe tested it by comparing our results to the results supplied by calculator available on the web def findpayment(loanrm)"""assumesloan and are floatsm an int returns the monthly payment for mortgage of size loan at monthly rate of for months""return loan*(( *( + )** )/(( + )** )class mortgage(object)"""abstract class for building different kinds of mortgages""def __init__(selfloanannratemonths)"""create new mortgage""self loan loan self rate annrate/ self months months self paid [ self owed [loanself payment findpayment(loanself ratemonthsself legend none #description of mortgage def makepayment(self)"""make payment""self paid append(self paymentreduction self payment self owed[- ]*self rate self owed append(self owed[- reductiondef gettotalpaid(self)"""return the total amount paid so far""return sum(self paiddef __str__(self)return self legend figure mortgage base class looking at __init__we see that all mortgage instances will have instance variables corresponding to the initial loan amountthe monthly interest ratethe duration of the loan in monthsa list of payments that have been made at the start of each month (the list starts with since no payments have been made at the start of the first month) list with the balance of the loan that is