On Problem Set #1I put in the following; B0=float(raw_input('What is your oustanding balance? $ ')) IN=float(raw_input('What is your interest rate in decimal form? ')) I=IN/12.0 PMT=10.00 B1=B0*(1+I)-PMT B2=B1*(1+I)-PMT B3=B2*(1+I)-PMT B4=B3*(1+I)-PMT B5=B4*(1+I)-PMT B6=B5*(1+I)-PMT B7=B6*(1+I)-PMT B8=B7*(1+I)-PMT B9=B8*(1+I)-PMT B10=B9*(1+I)-PMT B11=B10*(1+I)-PMT B12=round(B11*(1+I)-PMT,2) ## then running a loop on the following with all the above Bx definitions.. there has to be a better way than to run it 12 times? Also are there solutions on this site? I can't see
also tried the following: B0=float(raw_input('What is your oustanding balance? $ ')) IN=float(raw_input('What is your interest rate in decimal form? ')) I=IN/12.0 PMT=10.00 B=B0+(1+I)-PMT while B>0: PMT = PMT + 10 B=B0+(1+I)-PMT if B<=0: print 'RESULT' print 'Monthly payment needed to pay off in one year:$ ' print PMT print 'Balance:$ ' print B print '# of months' print NM
but it only does one payment at this point... giving me a single payment of 1220
Which problem in Problem Set 1? The first one looks like a and the second item looks like b?
Hi nerwaller, someone posted the solutions online. Thank you for your willingness to help!
Join our real-time social learning platform and learn together with your friends!