#Given
R=100 #ohm
Im=1*10**-3 #A
I=100*10**-3
#Calculation
Rsh=Im*R/(I-Im)
#Result
print"The value of shunt resistance is ", round(Rsh,2),"ohm"
#Given
Im=100.0*10**-6 #A
Rm=500 #ohm
I=100*10**-3 #A
#calculation
n=I/Im
Rsh=Rm/(n-1)
#Result
print"The value of required shunt is ", round(Rsh,2),"ohm"
#Given
I=10.0*10**-3 #A
Im=1.0*10**-3 #A
Rm=100 #ohm
I1=20.0*10**-3
I2=50.0*10**-3
#Calculation
# For the range of 0-10 mA
Rsh1=(Im*Rm)/(I-Im)
# For the range of 0-20 mA
Rsh2=(Im*Rm)/(I1-Im)
# For the range of 0-50 mA
Rsh3=(Im*Rm)/(I2-Im)
#Result
print"The value of the shunt resistance required for the range 0-10 mA", round(Rsh1,2),"ohm"
print"The value of the shunt resistance required for the range 0-20 mA", round(Rsh2,1),"ohm"
print"The value of the shunt resistance required for the range 0-50 mA", round(Rsh3,3),"ohm"
#Given
Im=10.0*10**-3 #A
Rm=500 #ohm
I=1000.0*10**-3 #A
I1=5000.0*10**-3 #A
I2=10000.0*10**-3 #A
#Calculation
# For the range of 0-1A, i.e, 1000mA
Rsh1=(Im*Rm)/(I-Im)
# For the range of 0-5A, i.e, 5000mA
Rsh2=(Im*Rm)/(I1-Im)
# For the range of 0-10A, i.e, 10000mA
Rsh3=(Im*Rm)/(I2-Im)
#Result
print"The value of shunt resistance for the range 0-1A", round(Rsh1,2),"ohm"
print"The value of shunt resistance for the range 0-5A", round(Rsh2,3),"ohm"
print"The value of shunt resistance for the range 0-10A", round(Rsh3*10**-1,3),"ohm"