#importing modules
import math
from __future__ import division
#Variable declaration
P=2550; #principal(Rs)
R=8; #rate(%)
T=3/12; #time(yrs)
#Calculation
TD=P*R*T/(100+(R*T)); #true discount(Rs)
BD=P*R*T/100; #banker's discount(Rs)
BG=BD-TD; #banker's gain(Re)
#Result
print "true discount is",TD,"Rs"
print "banker's discount is",BD,"Rs"
print "banker's gain is",BG,"Re"
#importing modules
import math
from __future__ import division
#Variable declaration
R=6; #rate(%)
T=11/12; #time(yrs)
BD=58.025; #banker's discount(Rs)
#Calculation
P=BD*100/(R*T); #principal(Rs)
#Result
print "principal is",P,"Rs"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
R=4; #rate(%)
T=9/12; #time(yrs)
TD=20; #true discount(Rs)
#Calculation
BD=TD*(1+(R*T/100)); #banker's discount(Rs)
#Result
print "banker's discount is",BD,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
R=3; #rate(%)
T=2; #time(yrs)
TD=50; #true discount(Rs)
#Calculation
BG=TD*R*T/100; #banker's gain(Rs)
#Result
print "banker's gain is",BG,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
P1=1000; #principal(Rs)
P2=1050; #principal(Rs)
R=5; #rate(%)
#Calculation
T=((P2*R*100/(P1*R))-100)/R; #time(yrs)
#Result
print "time is",T,"yr"
#importing modules
import math
from __future__ import division
#Variable declaration
TD=90; #true discount(Rs)
P=540; #principal(Rs)
#Calculation
BD=((TD**2)/(P-TD))+TD; #banker's discount(Rs)
#Result
print "banker's discount is",BD,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
R=5; #rate(%)
T=2; #time(yrs)
BG=15; #banker's gain(Rs)
#Calculation
P=BG*100*(100+(R*T))/((R*T)**2); #principal(Rs)
#Result
print "principal is",P,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
R=2; #rate(%)
T=5; #time(yrs)
BG=20; #banker's gain(Rs)
#Calculation
PW=BG*(100**2)/((R*T)**2); #present worth of bill(Rs)
#Result
print "present worth of bill is",PW,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
BG=25; #banker's gain(Rs)
PW=10000; #present worth of bill(Rs)
#Calculation
TD=math.sqrt(PW*BG); #true discount(Rs)
#Result
print "true discount is",TD,"Rs"
#importing modules
import math
from __future__ import division
#Variable declaration
BD=40; #banker's discount(Rs)
TD=30; #true discount(Rs)
#Calculation
P=BD*TD/(BD-TD); #sum(Rs)
#Result
print "sum is",P,"Rs"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
BD=1; #assume
BG=(7/57)*BD; #banker's gain(Rs)
T=2; #time(yrs)
#Calculation
R=BG*100/((BD-BG)*T); #rate(%)
#Result
print "rate is",R,"%"
#importing modules
import math
from __future__ import division
#Variable declaration
BDbyTD=21/20; #ratio of BD and TD
T=5/2; #time(yrs)
#Calculation
R=(BDbyTD-1)*100/T; #rate(%)
#Result
print "rate is",R,"%"