a=1
b=2
c=a+b
c
d=c+b
d
a=1
b=2
print(a)
print(b)
for count in range(0,30):
c=a+b
print(c)
a=b
b=c
P = 110000
rate= 7
L=30
r=rate/100
P*(r/12)/((1-(1+r/12)**(-12*L)))
def Total_payment(t):
return P*(r/12)/((1-(1+r/12)**(-12*L)))*t*12
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
X = np.arange(0,31,1/12)
plt.plot(X,Total_payment(X))
plt.show()
plt.plot(X,Total_payment(X))
plt.grid()
plt.title('Total payments')
plt.xlabel('years')
plt.ylabel('Total paid in $')
plt.show()
def Unpaid(t):
R = P*(r/12)/((1-(1+r/12)**(-12*L)))
return R*((1-(1+r/12)**(-(L*12-12*t))))/(r/12)
plt.plot(X,Unpaid(X))
plt.grid()
plt.title('Unpaid amount')
plt.xlabel('years')
plt.ylabel('Total paid in $')
plt.show()
plt.plot(X,Unpaid(X),label='unpaid',c='r')
plt.plot(X,Total_payment(X),label='money grubbing banks stole')
plt.grid()
plt.title('interesting graph')
plt.xlabel('years')
plt.ylabel('Total paid in $')
plt.legend()
plt.show()
range(2)