[ create a new paste ] login | about

Link: http://codepad.org/FNCkLfJy    [ raw code | output | fork ]

Python, pasted on Oct 12:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
balance = 3926
annualInterestRate = 0.2
monthlyInterestRate = annualInterestRate/12
mmp = 10
m = 1
while(balance > 0):
      balance = 3926
      m = 1
      mmp += 10
      while(m <=12):
           m +=  1
           balance = (balance - mmp)*(1 + monthlyInterestRate)
if(balance <= 0 and mmp > 0):
     print 'Lowest Payment: ', mmp


Output:
1
Lowest Payment:  360


Create a new paste based on this one


Comments: