Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

table and amorization charts using tkinter

import math
print("Payment Amount")
p=input()
print("interest value in decimals")
r=input()
print("Loan Period in years")
t=input()
p=float(p)
r=float(r)
t=float(t)
m=(p*(r/12)*(math.pow(1+r/12,12*t)))/(math.pow(1+r/12,12*t)-1)
print("Loan paymnet amount monthly is: $"+str(m))
print("PaymentNumber	PaymnetAmount	PrincipalAmountPaid	InterestAmountPaid	LoanOutstandingBalance")
month=12*t
month=int(month)
PaymentAmount=p
LoanOutstandingBalance=p
for i in range(1,month+1):
    
    InterestAmountPaid=r/12*PaymentAmount
    PrincipalAmountPaid=m-InterestAmountPaid
    LoanOutstandingBalance=PaymentAmount+InterestAmountPaid-m
    print(str(i)+"		$"+str(round(PaymentAmount,2))+"		$"+str(round(PrincipalAmountPaid,2))+"		$"+str(round(InterestAmountPaid,2))+"		$"+str(round(LoanOutstandingBalance,2)))
    PaymentAmount=LoanOutstandingBalance  

 
PREVIOUS NEXT
Tagged: #table #amorization #charts #tkinter
ADD COMMENT
Topic
Name
2+6 =