#importing modules
import math
from __future__ import division
#Variable declaration
P1=1000; #principal(Rs)
R1=20; #rate(%)
T1=4; #time(years)
P2=600; #principal(Rs)
R2=5; #rate(%)
T2=4/12; #time(years)
P3=200; #principal(Rs)
R3=6*2; #rate(%)
T3=3; #time(years)
P4=500; #principal(Rs)
R4=2*2; #rate(%)
T4=5/2; #time(years)
P5=400; #principal(Rs)
R5=3*4; #rate(%)
T5=2/12; #time(years)
P6=730; #principal(Rs)
R6=10; #rate(%)
T6=120/365; #time(years)
#Calculation
SI1=P1*T1*R1/100; #simple interest in 1st case(Rs)
SI2=P2*T2*R2/100; #simple interest in 2nd case(Rs)
SI3=P3*T3*R3/100; #simple interest in 3rd case(Rs)
SI4=P4*T4*R4/100; #simple interest in 4th case(Rs)
SI5=P5*T5*R5/100; #simple interest in 5th case(Rs)
SI6=P6*T6*R6/100; #simple interest in 1st case(Rs)
#Result
print "simple interest in 1st case is",SI1,"Rs"
print "simple interest in 2nd case is",SI2,"Rs"
print "simple interest in 3rd case is",SI3,"Rs"
print "simple interest in 4th case is",SI4,"Rs"
print "simple interest in 5th case is",SI5,"Rs"
print "simple interest in 6th case is",SI6,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
P1=100; #principal(Rs)
R1=3; #rate(%)
T1=2; #time(years)
P2=500; #principal(Rs)
R2=6; #rate(%)
T2=4/12; #time(years)
P3=400; #principal(Rs)
R3=3.65; #rate(%)
T3=150/365; #time(years)
A4=540; #amount(Rs)
R4=5; #rate(%)
SI4=108; #simple interest(Rs)
A5=1120; #amount(Rs)
R5=5; #rate(%)
T5=12/5; #time(years)
#Calculation
A1=P1*(1+(R1*T1/100)); #amount in 1st case(Rs)
A2=P2*(1+(R2*T2/100)); #amount in 2nd case(Rs)
A3=P3*(1+(R3*T3/100)); #amount in 3rd case(Rs)
x=(A4/SI4)-1;
T4=100/(x*R4); #time in 4th case(years)
y=(100/(R5*T5))+1;
SI5=A5/y; #simple interest in 5th case(Rs)
#Result
print "amount in 1st case is",A1,"Rs"
print "amount in 2nd case is",A2,"Rs"
print "amount in 3rd case is",A3,"Rs"
print "time in 4th case is",T4,"years"
print "simple interest in 5th case is",SI5,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
SI=810; #simple interest(Rs)
R=9; #rate(%)
T=6; #time(years)
#Calculation
P=100*SI/(R*T); #principal(Rs)
#Result
print "principal is",P,"Rs"
#importing modules
import math
from __future__ import division
from fractions import Fraction
#Variable declaration
T=8; #time(years)
N=2; #number of times
#Calculation
R=100*(N-1)/T; #rate(%)
x=R-int(R);
#Result
print "rate is",int(R),Fraction(x),"%"
#importing modules
import math
from __future__ import division
#Variable declaration
R=5/2; #rate(%)
T=2; #time(years)
A=630; #amount(Rs)
#Calculation
P=A/(1+(R*T/100)); #principal(Rs)
#Result
print "principal is",P,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
T1=2; #time(years)
A1=720; #amount(Rs)
T2=2+5; #time(years)
A2=1020; #amount(Rs)
#Calculation
P=((A1*T2)-(A2*T1))/(T2-T1); #principal(Rs)
R=(A2-A1)*100/((A1*T2)-(A2*T1)); #rate(%)
#Result
print "principal is",P,"Rs"
print "rate is",R,"%"
#importing modules
import math
from __future__ import division
#Variable declaration
P=1; #assume
SI=16*P/25;
#Calculation
#given T=R
R_2=SI*100;
R=math.sqrt(R_2); #rate(%)
T=R; #time(years)
#Result
print "rate is",R,"%"
print "time is",T,"years"
#importing modules
import math
from __future__ import division
#Variable declaration
P=2500; #principal(Rs)
SI=265; #simple interest(Rs)
T=2; #time(years)
r1=5; #rate(%)
r2=7; #rate(%)
#Calculation
Rm=100*SI/(T*P); #rate of interest(%)
S1=r2-Rm; #sum borrowed at 5%
S2=Rm-r1; #sum borrowed at 7%
S_5=S1*P/(S1+S2); #sum at 5%(Rs)
S_7=S2*P/(S1+S2); #sum at 7%(Rs)
#Result
print "sum at 5% is",S_5,"Rs"
print "sum at 7% is",S_7,"Rs"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
p1=1/3; #1st part
p2=1/6; #2nd part
r1=3; #rate(%)
r2=6; #rate(%)
r3=8; #rate(%)
SI=600; #simple interest(Rs)
T=2; #time(years)
#Calculation
p3=1-(p1+p2); #rest part
R=(p1*r1)+(p2*r2)+(p3*r3); #average rate(%)
P=100*SI/(R*T); #principal(Rs)
#Result
print "principal is",P,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
M=4200; #debt(Rs)
n=5; #number of years
y=1;
r=10; #rate(%)
#Calculation
x=n*(n-1)/2;
z=x*r/(100*y);
a=M/(n+z); #annual installment(Rs)
#Result
print "annual installment is Rs",a,"per year"
#importing modules
import math
from __future__ import division
#Variable declaration
M=2; #debt(Rs)
n=3; #number of years
y=12;
a=1; #annual installment(Rs)
#Calculation
x=n*(n-1)/2;
z=x*a/(100*y);
r=(-M+(n*a))/z; #rate(%)
#Result
print "rate is",r,"%"
#importing modules
import math
from __future__ import division
#Variable declaration
R1=R2=1; #assume
T1=3; #time(years)
A1=95; #amount(Rs)
T2=5; #time(years)
P1=85; #principal(Rs)
P2=102; #principal(Rs)
#Calculation
A2=((A1-P1)*P2*T2*R2/(P1*R1*T1))+P2; #amount(Rs)
#Result
print "amount is",A2,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
R1_R2=2; #change in rate(%)
SI1_SI2=56; #change in simple interest(Rs)
T=4; #time(years)
#Calculation
P=100*SI1_SI2/(R1_R2*T); #principal(Rs)
#Result
print "principal is",P,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
R1=8; #rate(%)
R2=1/2; #rate(%)
T1=5; #time(years)
T2=15; #time(years)
P=3800; #principal(Rs)
P1=T2; #principal(Rs)
P2=2*R1*T1; #principal(Rs)
P1=P1*P/(P1+P2); #sum lent out(Rs)
#Result
print "sum lent out is",P1,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
R1=5; #rate(%)
A1=80; #amount(Rs)
R2=2; #rate(%)
A2=40; #amount(Rs)
#Calculation
P=((A1*R2)-(A2*R1))/(R2-R1); #principal(Rs)
T=(A2-A1)*100/((A1*R2)-(A2*R1)); #time(years)
#Result
print "principal is",round(P,2),"Rs"
print "time is",T,"years"