from __future__ import division
r=250
s=1000
l=1000
x=r*l/s
print "Position of the fault=%.1fm"%(x)
r=600
s=1000
El=500*30/50
l=450+El
x=r*l/s
print "Position of the fault=%.1f m"%(x)
R_armature=0.256/16
print "Armature Resistance=%.2f ohm"%(R_armature)
R_armature_true=0.256/(16-(0.256/10))
Error=R_armature-R_armature_true
Error_percentage=Error*100/R_armature_true
print "\nPercentage Error=%.2f"%(Error_percentage)
R1=45
R2=100-R1
l=500
x=2*l*R1/(R1+R2)
print "Position of the fault from the test end=%.1f m"%(x)
r3=300
r2=1500
r1=15
R=(r3/r2)*r1
l=4000
r3=180
d=(2*l/R)*(R*r2-r3*r1)/(r1+r2)
print "Distance of the fault=%.2fm"%(d)