Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Feb 25th, 2013  |  syntax: None  |  size: 0.74 KB  |  hits: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import math
  2.  
  3. Oblance=float(raw_input("Enter the outstanding blance on your credit card?"))
  4. Irate=float(raw_input("Enter the annual credit card interest rate as a decimal?"))
  5. Mprate=float(raw_input("Enter the minimum monthly payment rate as a decimal?"))
  6.  
  7. tbalance=Oblance
  8. totalpay=0
  9. for i in range(1,13):
  10.    
  11.     mmp=Oblance*Mprate
  12.     ip=Irate/12*Oblance
  13.     pp=mmp-ip
  14.     Rblance=Oblance-pp
  15.     Oblance=Rblance
  16.     totalpay+=mmp
  17.     print "month " + str(i)
  18.     print "Minimum monthly payment: "+ str(round(mmp,2))
  19.     print "Principle balance: "+str(round(pp,2))
  20.     print "Remaining blance: "+str(round(Rblance,2))
  21.  
  22. print "RESULT"
  23. print "Total amount paid: " + str(round(totalpay,2))
  24. print "Remaining blance: " + str(round(Rblance,2))