plotting and more about classes def plotmortgages(mortsamt)styles [' -'' '' :'#give names to figure numbers payments cost balance netcost pylab figure(paymentspylab title('monthly payments of different $str(amtmortgages'pylab xlabel('months'pylab ylabel('monthly payments'pylab figure(costpylab title('cash outlay of different $str(amtmortgages'pylab xlabel('months'pylab ylabel('total payments'pylab figure(balancepylab title('balance remaining of $str(amtmortgages'pylab xlabel('months'pylab ylabel('remaining loan balance of $'pylab figure(netcostpylab title('net cost of $str(amtmortgages'pylab xlabel('months'pylab ylabel('payments equity $'for in range(len(morts))pylab figure(paymentsmorts[iplotpayments(styles[ ]pylab figure(costmorts[iplottotpd(styles[ ]pylab figure(balancemorts[iplotbalance(styles[ ]pylab figure(netcostmorts[iplotnet(styles[ ]pylab figure(paymentspylab legend(loc 'upper center'pylab figure(costpylab legend(loc 'best'pylab figure(balancepylab legend(loc 'best'def comparemortgages(amtyearsfixedrateptsptsratevarrate varrate varmonths)totmonths years* fixed fixed(amtfixedratetotmonthsfixed fixedwithpts(amtptsratetotmonthsptstworate tworate(amtvarrate totmonthsvarrate varmonthsmorts [fixed fixed tworatefor in range(totmonths)for mort in mortsmort makepayment(plotmortgages(mortsamtfigure generate mortgage plots the call comparemortgages(amt= years= fixedrate= pts ptsrate= varrate = varrate = varmonths=