#initiation of vriable
Ii=100000.0;#in Rs
Ar=30000.0;#in Rs
n=5.0;#in years
i1=10.0;#in % per annum
#calcualton
PW1=-Ii+Ar*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS
#result
print "The present worth for i=10% in RS. ",round(PW1,3);
#calcualtion
i2=15.0;#in % per annum
PW2=-Ii+Ar*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS
#result
print "The present worth for i=15% in RS. ",round(PW2,3);
#calculation
i3=18.0;#in % per annum
PW3=-Ii+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS
i=15+(PW2-0)*(i3-i2)/(PW2-PW3);#in Rs
#result
print "The present worth for i=18% in RS. ",round(PW3,3)
print "Present worth for i=15% is suitable.";
print "Therefore, the rate of return for the new business in % per annum ",round(i,3);
#initiation of variable
Io=2000000.0;#in Rs
ANP=350000.0;#in Rs
S=0.0;#in Rs
n=10.0;#in years
i1=10.0;#in % per annum
#calcualtion
PW1=-Io+ANP*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS
#result
print "The present worth for i=10% in RS. ",round(PW1,3);
#calculation
i2=12.0;#in % per annum
PW2=-Io+ANP*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS
i=10+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.
#result
print "The present worth for i=15% in RS. ",round(PW2,3);
print "Present worth for i=10% is suitable.";
print "Therefore, the rate of return for the new business in % per annum ",round(i,3);
#initiation of variable
#alternate 1
Io=150000.0;#in Rs
Ap=45570.0;#in Rs
n=5.0;#in years
#calculation
i1=10.0;#in % per annum
PW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS
i2=12.0;#in % per annum
PW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS
i3=15.0;#in % per annum
PW3=-Io+Ap*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS
i4=18.0;#in % per annum
PW4=-Io+Ap*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS
i=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.
#result
print "The present worth for i=10% in RS. ",round(PW1,3);
print "The present worth for i=12% in RS. ",round(PW2,3);
print "The present worth for i=15% in RS. ",round(PW3,3);
print "The present worth for i=18% in RS. ",round(PW4,3);
print"Present worth for i=15% is suitable.";
print "Therefore, the rate of return of alternative in % per annum :",round(i,3);
#alternative 2
Io=210000.0;#in Rs
Ap=58260.0;#in Rs
n=5.0;#in years
i1=12.0;#in % per annum
#calcualtion
PW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS
i2=13.0;#in % per annum
PW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS
i=i1+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.
#result
print "The present worth for i=12% in RS. ",round(PW1,3);
print "The present worth for i=13% in RS. ",round(PW2,3);
print"Present worth for i=12% is suitable.";
print "Therefore, the rate of return of alternative in % per annum :",round(i,3);
#Alternative 3:
Io=255000.0;#in Rs
Ap=69000.0;#in Rs
n=5.0;#in years
i1=11.0;#in % per annum
PW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS
i2=12.0;#in % per annum
PW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS
i=i1+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.
#result
print "The present worth for i=11% in RS. ",round(PW1,3);
print "The present worth for i=12% in RS. ",round(PW2,3);
print"Present worth for i=12% is suitable.";
print "Therefore, the rate of return of alternative in % per annum :",round(i,3);
print"It is clear that rate of return for alternative 3v is less than the minimum attractive rate of return of 12 %. So it should not be considered for comparison. the remaining two alternatives are qualified for consideration. Among the alternatives 1 and 2, the rate of return of 1 is greater than that of 2. hence,alternative 1 should be selected. ";
#initiation of variable
A0=-1275.0;#in Rs
A1=150.0;#in Rs
G=150.0;#in Rs
i=10.0;#in % per annum
n=5.0;#in years
#calcualtion
A=A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;#in RS
i1=10.0;#in % per annum
PW1=A0+(A1+G*(((1+i1/100)**n)-i1*n/100-1)/(((i1/100)*(1+i1/100)**n)-i1/100))*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#i1n Rs.
i2=12.0;#i2n % per annum
PW2=A0+(A1+G*(((1+i2/100)**n)-i2*n/100-1)/(((i2/100)*(1+i2/100)**n)-i2/100))*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#i2n Rs.
i3=15.0;#i3n % per annum
PW3=A0+(A1+G*(((1+i3/100)**n)-i3*n/100-1)/(((i3/100)*(1+i3/100)**n)-i3/100))*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#i3n Rs.
i4=18.0;#in % per annum
PW4=A0+(A1+G*(((1+i4/100)**n)-i4*n/100-1)/(((i4/100)*(1+i4/100)**n)-i4/100))*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in Rs.
i=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.
#result
print "The annual equivalent of the positive cash flows in RS. : ",round(A,3);
print "PW(10)",round(PW1,3);
print "PW(12)",round(PW2,3);
print "PW(15)",round(PW3,3);
print "PW(18)",round(PW1,4);
print"Present worth for i=15% is suitable.";
print "Therefore, the rate of return for the given cash flow in % per annum :",round(i,3);
#initiation of variable
#alternative 1
Io=500000.0;#in Rs
Ar=170000.0;#in Rs
n=5.0;#in years
i1=15.0;#in % per annum
#calculation
PW1=-Io+Ar*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS
i2=17.0;#in % per annum
PW2=-Io+Ar*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS
i3=20.0;#in % per annum
PW3=-Io+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS
i4=22.0;#in % per annum
PW4=-Io+Ar*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS
i=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.
#result
print "The present worth(PW(15%)) for i=10% in RS. ",round(PW1,3);
print "The present worth(PW(17%)) for i=10% in RS. ",round(PW2,3);
print "The present worth(PW(20%)) for i=10% in RS. ",round(PW3,3);
print "The present worth(PW(22%)) for i=10% in RS. ",round(PW4,3);
print "Present worth for i=15% is suitable.";
print "Therefore, the rate of return of alternative 1 in % per annum ",round(i,3);
#altenative 2
Io=800000.0;#in Rs
Ar=270000.0;#in Rs
n=5.0;#in years
i3=20.0;#in % per annum
#calculation
PW3=-Io+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS
i4=22.0;#in % per annum
PW4=-Io+Ar*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS
i=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.
#result
print "The present worth(PW(20%)) for i=10% in RS. ",round(PW3,3);
print "The present worth(PW(22%)) for i=10% in RS. ",round(PW4,3);
print "Present worth for i=15% is suitable.";
print "Therefore, the rate of return of alternative 2 in % per annum ",round(i,3);
print "Since the rate of return of alternative 1 is greater than that of the alternative 2, select alternative 1. ";