# Depreciation¶

## Example 9.1 Page 127¶

In [7]:
#initiation of variable
P=100000.0;#in Rs
F=20000.0;#in Rs
n=8.0;#in years
eoy=[0,1,2,3,4,5,6,7,8]#end of year
Bt=100000;#book vakue

#calcualtion
Dt=(P-F)/n;#in Rs.

#result
print "End of year          Depreciation          Book value";
for i in range (8):
B=Bt-i*Dt;
print  eoy[i],"                    ",Dt,"            ", B," ";


End of year          Depreciation          Book value
0                      10000.0              100000.0
1                      10000.0              90000.0
2                      10000.0              80000.0
3                      10000.0              70000.0
4                      10000.0              60000.0
5                      10000.0              50000.0
6                      10000.0              40000.0
7                      10000.0              30000.0


## Example 9.2 Page 127¶

In [8]:
#initiation of variable
P=100000.0;#in Rs
F=20000.0;#in Rs
n=8.0;#in years

#calculation
D5=(P-F)/n;#in Rs.
t=5;#in years
Bt=P-t*(P-F)/n;#in Rs

#result
print "D5 in Rs. : ",round(D5,3);
print "(This is independent of the time period)";
print "B5 in Rs. : ",round(Bt,3);

D5 in Rs. :  10000.0
(This is independent of the time period)
B5 in Rs. :  50000.0


## Example 9.3 Page 129¶

In [22]:
#initiation of variable
P=100000.0;#in Rs
F=20000.0;#in Rs
n=8.0;#in years
k=0.2
eoy=[0,1,2,3,4,5,6,7,8]#end of year
Bt=[100000.0,0,0,0,0,0,0,0,0];#book vakue
Dt=[0.0,0,0,0,0,0,0,0,0];

#result
print "End of year          Depreciation          Book value";
print "0                      0                    100000"
for i in xrange (1,9):
Dt[i]=k*Bt[i-1];
Bt[i]=Bt[i-1]-Dt[i];
print  eoy[i],"                    ",Dt[i],"            ", Bt[i]," ";

End of year          Depreciation          Book value
0                      0                    100000
1                      20000.0              80000.0
2                      16000.0              64000.0
3                      12800.0              51200.0
4                      10240.0              40960.0
5                      8192.0              32768.0
6                      6553.6              26214.4
7                      5242.88              20971.52
8                      4194.304              16777.216


## Example 9.4 Page 128¶

In [23]:
#initiation of variable
P=100000.0;#in Rs
F=20000.0;#in Rs
n=8.0;#in years
k=0.2
t=5.0;#in years

#calculation
Dt=k*(1-k)**(t-1)*P;#in Rs.
Bt=((1-k)**t)*P;#in Rs.

#result
print "D5 in Rs. : ",round(Dt,3);
print "B5 in Rs. : ",round(Bt,3);

D5 in Rs. :  8192.0
B5 in Rs. :  32768.0


## Example 9.5 Page 129¶

In [25]:
#initiation of variable
P=100000.0;#in Rs
F=20000.0;#in Rs
n=8.0;#in years
Sum=n*(n+1)/2;#sum of the years
eoy=[0,1,2,3,4,5,6,7,8]#end of year
Bt=[100000.0,0,0,0,0,0,0,0,0];#book vakue
Dt=[0.0,0,0,0,0,0,0,0,0];
rate=[0.0,0,0,0,0,0,0,0,0];

#result
print "End of year          Depreciation          Book value";
print "0                      0                    100000"
for i in xrange (1,9):
rate[i]=(8-i+1)/36.0;
Dt[i]=rate[i]*(P-F);
Bt[i]=Bt[i-1]-Dt[i];
print  eoy[i],"                    ",Dt[i],"            ", Bt[i]," ";

End of year          Depreciation          Book value
0                      0                    100000
1                      17777.7777778              82222.2222222
2                      15555.5555556              66666.6666667
3                      13333.3333333              53333.3333333
4                      11111.1111111              42222.2222222
5                      8888.88888889              33333.3333333
6                      6666.66666667              26666.6666667
7                      4444.44444444              22222.2222222
8                      2222.22222222              20000.0


## Example 9.6 Page 131¶

In [26]:
#initiation of variable
P=100000.0;#in Rs
F=20000.0;#in Rs
n=8.0;#in years
t=5.0;#in years

#cacualtion
Dt=(n-t+1)*(P-F)/(n*(n+1)/2);#in Rs.
Bt=(P-F)*((n-t)/n)*((n-t+1)/(n+1))+F;#in Rs.

#result
print "D5 in Rs. : ",round(Dt,3);
print "B5 in Rs. : ",round(Bt,3);

D5 in Rs. :  8888.889
B5 in Rs. :  33333.333


## Example 9.7 Page 132¶

In [30]:
#initiation of variable
P=100000.0;#in Rs
F=20000.0;#in Rs
n=8.0;#in years
k=0.12;
i=12.0;#in % per annum
eoy=[0,1,2,3,4,5,6,7,8]#end of year
Bt=[100000.0,0,0,0,0,0,0,0,0];#book vakue
Dt=[0.0,0,0,0,0,0,0,0,0];
rate=[0.0,0,0,0,0,0,0,0,0];
SUM=0;

#calculation
A=(P-F)*(i/100)/(((1+i/100)**n)-1);

#result
print "End of year          Net Depreciation          Book value";
print "0                      0                         100000"
for i in xrange (1,9):
Dt[i]=k*SUM+A;
SUM=SUM+Dt[i]
Bt[i]=Bt[i-1]-Dt[i];
print  eoy[i],"                    ",round(Dt[i],3),"            ", round(Bt[i],3)," ";

print "fixed deprececiation which is constant in Rs",round(A,3);

End of year          Net Depreciation          Book value
0                      0                         100000
1                      6504.227              93495.773
2                      7284.735              86211.038
3                      8158.903              78052.135
4                      9137.971              68914.164
5                      10234.528              58679.637
6                      11462.671              47216.966
7                      12838.191              34378.774
8                      14378.774              20000.0
fixed deprececiation which is constant in Rs 6504.227


## Example 9.8 Page 133¶

In [31]:
#initiation of variable
P=100000.0;#in Rs
F=20000.0;#in Rs
n=8.0;#in years
i=12.0;#in % per annum
t=5.0;#in Years

#calculation
Dt=(P-F)*(i/100)/(((1+i/100)**n)-1)*(1+i/100)**(t-1);#in Rs.
t=7;#in Years
Bt=P-(P-F)*(i/100)/(((1+i/100)**n)-1)*(((1+i/100)**t)-1)/(i/100);#in Rs.

#result
print "D7 in Rs. : ",round(Dt,3);
print "B7 in Rs. : ",round(Bt,3);

D7 in Rs. :  10234.528
B7 in Rs. :  34378.774


## Example 9.9 Page 134¶

In [32]:
#initiation of variable
P=8000000.0;#in Rs
F=50000.0;#in Rs
X=75000.0;#in Km
x=2000.0;#in Km
n=8.0;#in years
i=12.0;#in % per annum

#calcualtion
D=(P-F)*x/X;#in Rs.

#result
print "Depreciation for year 3 in Rs. : ",round(D,3);

Depreciation for year 3 in Rs. :  212000.0