Guest User

Untitled

a guest
Jan 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. intCount=0
  2. monPaymentCount=0
  3. for monNum in range(1,13):
  4.     monthlyPayment=balance*monthlyPaymentRate
  5.     interes=(balance-monthlyPayment)*(annualInterestRate/12)
  6.     newBalance=balance-monthlyPayment+interes
  7.     balance=newBalance
  8.     intCount = intCount + interes
  9.     monPaymentCount = monPaymentCount +  monthlyPayment
  10.     yearlyPayments=monPaymentCount
  11.     print ('Month: ' + str(monNum) + ' ' + 'Minimum monthly payment: ' + str(round(monthlyPayment,2)) + ' ' + 'Remaining balance: ' + str(round(balance,2)))
  12. print ('Total paid: ' + str(round(yearlyPayments,2)) + ' ' +' Remaining balance: ' + str(round(balance,2)))
Add Comment
Please, Sign In to add comment