In [3]:

```
#initiation of variable
run=20000.0; #km
kmperlitre=9; #kmpl
cost=21;
G=2222.20;#in Rs.
i=18.0;#in % per annum
n=4.0;#in years
#calculation
con=run/kmperlitre;#consumption
A1=con*cost;
A=A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;
#result
print "Annual equal amount spending for petrol in Rs. : ",round(A,3);
print "This amoount is less than the annual rental value of Rs. 60000. Therefore, the company should continue to provide its own car to its executive. ";
```

In [8]:

```
#initiation of variable
#alternative 1
P=500000.0;#in Rs
A=200000.0;#in Rs
i=20.0;#in % per annum
n=15.0;#in years
#calcultion
AE_1=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS
#result
print "The Annual equivalent cost of alternative 1 in RS. : ",round(AE_1,3);
#alternative 2
P=400000.0;#in Rs
A=300000.0;#in Rs
i=20.0;#in % per annum
n=15.0;#in years
#calculation
AE_2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS
#result
print "The Annual equivalent cost of alternative 2 in RS. : ",round(AE_2,3);
#alternative 3
P=600000.0;#in Rs
A=150000.0;#in Rs
i=20.0;#in % per annum
n=15.0;#in years
#calculation
AE_3=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS
#result
print "The Annual equivalent cost of alternative 3 in RS. : ",round(AE_3,3);
print"The annual equivalent cost of manufacturer 3 is less than that of other two. Therefore, company should buy advanced machine centre from manufacturer 3. ";
print " Calculation in the book is not accurate."
```

In [10]:

```
#initiation of variable
#alternative a
P=150000.0;#in Rs
A=60000.0;#in Rs
S=15000.0;#in Rs
i=25.0;#in % per annum
n=5.0;#in years
#calculation
AE_A=-P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A+S*(i/100)/(((1+i/100)**n)-1);#in RS
#result
print "The Annual equivalent revenue of alternative A in RS. : ",round(AE_A,3)
#alternative b
P=175000.0;#in Rs
A=70000.0;#in Rs
S=35000.0;#in Rs
i=25.0;#in % per annum
n=5.0;#in years
#calculation
AE_B=-P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A+S*(i/100)/(((1+i/100)**n)-1);#in RS
#result
print "The Annual equivalent revenue of alternative B in RS. : ",round(AE_B,3)
print "The annual equivalent net return of alternative B is more than that of alternative A. Thus the company should select alternative A";
print " Calculation in the book is not accurate."
```

In [14]:

```
#initiation of variable
#machine X
P=150000.0;#in Rs
A=0.0;#in Rs
S=0.0;#in Rs
i=15.0;#in % per annum
n=12.0;#in years
#calcualtion
AE_X=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in RS
#result
print "The Annual equivalent cost of machine X in RS. : ",round(AE_X,3);
#machine Y
P=240000.0;#in Rs
A=4500.0;#in Rs
S=60000.0;#in Rs
i=15.0;#in % per annum
n=12.0;#in years
#calcualtion
AE_Y=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in RS
#result
print "The Annual equivalent cost of machine Y in RS. : ",round(AE_Y,3);
print "The annual equivalent cost of machine X is less than that of machine Y.So machine X is more cost effective machine. ";
print" Calculation in the book is not accurate."
```

In [2]:

```
#initialisation of variable
#alternative 1
FC=15*150000.0;#in Rs
MC=15*6000.0;#in Rs
PL=15*15000.0;#in Rs
#calculation
MCPL=MC+PL;#in Rs
S=15*90000.0;#in Rs
i=15.0;#in % per annum
n=15.0;#in years
AE1=FC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+MCPL-S*(i/100)/(((1+i/100)**n)-1);#in RS
#result
print "The Annual equivalent cost for this alternative in RS. ",round(AE1,3);
#alternative 2
FC=5*750000.0;#in Rs
MC=5*12000.0;#in Rs
PL=5*15000.0;#in Rs
MCPL=MC+PL;#in Rs
S=5*150000.0;#in Rs
i=15.0;#in % per annum
n=15.0;#in years
#calcualtion
AE2=FC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+MCPL-S*(i/100)/(((1+i/100)**n)-1);#in RS
#result
print "The Annual equivalent cost for this alternative in RS. ",round(AE2,3);
print "The annual equivalent cost of alternative 1 is less than that of alternative 2. Therefore, select the route around the lake for laying the power line.";
print " Calculation in the book is not accurate."
```

In [3]:

```
#initiation of variable
#alternative 1
VC=390000.0;#in Rs
LpY=60000.0/30;#in litres
FcY=2000.0*8;#in Rs
AllExp=FcY+9000.0+15000.0;#in Rs
S=60000.0;#in Rs
i=20.0;#in % per annum
n=4.0;#in years
#calcualtion
AE1=VC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AllExp-S*(i/100)/(((1+i/100)**n)-1);#in RS
#result
print "The Annual equivalent cost for this alternative in RS. ",round(AE1,3);
#alternative 2
VC=360000.0;#in Rs
LpY=60000.0/20;#in litres
FcY=3000.0*20;#in Rs
AllExp=FcY+6000.0+15000.0;#in Rs
S=90000.0;#in Rs
i=20.0;#in % per annum
n=3.0;#in years
#calculation
AE2=VC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AllExp-S*(i/100)/(((1+i/100)**n)-1);# in RS
#result
print "The Annual equivalent cost for this alternative in RS. ",round(AE2,3);
print "The annual equivalent cost of purchase and operation of cars with diesel engine is less than that of cars with petrol engine. Therefore, the taxy company should buy cars with diesel engine.";
print " Calculation in the book is not accurate."
```

In [5]:

```
#initiation of variable
#alternative 1
Pprice=390000.0;#in Rs
n=3.0;#in years
n=n*12;#in months
S=120000.0;#in Rs
i=12.0;#in % nominal rate(Compounded anually)
i=i/12.0;#in % compounded monthly
#calculation
ME1=Pprice*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)-S*(i/100)/(((1+i/100)**n)-1);#in RS
#result
print "The Monthly equivalent cost for this alternative in RS. ",round(ME1,3);
#Alternative 2
LeaseAmount=10500.0;#in Rs
#calcualtion
MonthlyEquiCost=LeaseAmount;#in Rs.
#result
print"The Monthly equivalent cost for this alternative in RS. ",round(MonthlyEquiCost,3);
print"The monthly equivalent cost of alternative 1 is less than that of alternative 2. hence the salesman should purchase the car for cash."
```

In [6]:

```
#initiation of variable
#machine A
IC=300000.0;#in Rs
n=4.0;#in years
S=200000.0;#in Rs
AM=30000.0;#in Rs
i=15.0;#in % per annum
#calcualtion
AE_A=IC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AM-S*(i/100)/(((1+i/100)**n)-1);#in RS
#result
print "The Annual equivalent cost of machine X in RS. ",round(AE_A,3);
#Machine B :
IC=600000.0;#in Rs
n=4.0;#in years
S=300000.0;#in Rs
AM=0.0;#in Rs
i=15.0;#in % per annum
#calcualtion
AE_B=IC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AM-S*(i/100)/(((1+i/100)**n)-1);#in RS
#result
print "The Annual equivalent cost of machine X in RS. ",round(AE_B,3);
print "The annual equivalent cost of machine A is less than that of machine B.So machine A is more cost effective machine. It is advised to buy machine A ";
print " Calculation in the book is not accurate."
```

In [8]:

```
#initiation of variable
#alternative 1
DP=60000.0;#in Rs
P1=15000.0;#in Rs
n=1.0;#in years
i=12.0;#in % Compounded anually
#calculation
PW1=DP+P1*1/((1+i/100)**n);#in RS
n=4.0;#in years
AE1=PW1*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)
#result
print "The annual equivalent for this alternative in RS. ",round(PW1,3);
print "The annual equivalent for this alternative in RS.",round(AE1,3);
#alternative 2
P4y=90000.0;#in Rs
AE2=P4y*(i/100)/(((1+i/100)**n)-1);#in Rs.
#result
print "The annual equivalent for this alternative in RS. ",round(AE2,3);
print "The annual equivalent cost of alternative 2 is less than that of alternative 1. Hence, Joshi Lakshimi should select alternative 2 for purchasing the home equipment.";
print " Calculation in the book is not accurate."
```

In [9]:

```
#initation of variable
#Brand C :
w=12.0;#in months
P=1200.0;#in Rs/tyre
i=12.0;#in % nominal rate(Compounded anually)
i=i/12.0;#in % compounded monthly
#calculation
AE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS
#result
print "The annual equivalent for this brand in RS. ",round(AE_C,3);
#Brand C :
w=24.0;#in months
P=1800.0;#in Rs/tyre
i=12.0;#in % nominal rate(Compounded anually)
i=i/12.0;#in % compounded monthly
#calculation
AE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS
#result
print "The annual equivalent for this brand in RS. ",round(AE_C,3);
#Brand C :
w=36.0;#in months
P=2100.0;#in Rs/tyre
i=12.0;#in % nominal rate(Compounded anually)
i=i/12.0;#in % compounded monthly
#calculation
AE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS
#result
print "The annual equivalent for this brand in RS. ",round(AE_C,3);
#Brand D :
w=48.0;#in months
P=2700.0;#in Rs/tyre
i=12.0;#in % nominal rate(Compounded anually)
i=i/12.0;#in % compounded monthly
#calculation
AE_D=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS
#result
print "The annual equivalent for this brand in RS. ",round(AE_D,3);
print "Here common multiple lives of tyres is considered. This is 144 months. Therefore, the comparison is nade on 144 months basis.";
print "The annual equivalent cost of Brand C is less than that of other brands. hence, it should be used in the vehicles of the trucking company. It should be replaced for times during the 144 months period.";
```