#Given
a=60 #Degree
Bh=0.16 #G
#Calculation
import math
B=Bh/cos(a*3.14/180.0)
#Result
print"Magnitude of earth's field is", round(B,2),"G"
#Given
a=60
a2=45
#Calculation
import math
a1=math.tan(a2*3.14/180.0)/math.cos(a*3.14/180.0)
a3=math.atan(a1)*180/3.14
#Result
print"Apparent value of the dip is", round(a3,1),"degree"
#Given
l=30 #cm
l=0.15 #m
r=0.30 #m
Bh=0.34*10**-4 #T
u=10**-7
#Calculation
M=Bh*(r**2-l**2)**2/(2*u*r)
m=M/(2*l)
#Result
print"Pole strength of the magnet is",m,"Am"
#Given
M=0.4 #Am**2
r=0.1 #m
l=0.05 #m
u=10**-7
#Calculation
Bh=u*M/((r**2+l**2)**1.5)
#Result
print"Horizontal component of earth's magnetic field is", round(Bh*10**4,3)*10**-4,"T"
#Given
B=0.33
a=0
u=10**-7
I=2.5 #A
#Calculation
import math
Bh=B/math.cos(a*3.14/180.0)
a=u*2*I/(Bh*10**-4)
#Result
print"Neutral point is", round(a*10**2,1),"cm"
#Given
Bh=0.32 #G
B=0.48
#Calculation
import math
a=B/Bh
a1=math.atan(a)*180/3.14
#Result
print"New stable equilibrium is", round(a1,1),"degree"
#Given
n=22
a=0.1 #m
Bh=0.3*10**-4 #T
u=10**-7
#Calculation
import math
K=2*a*Bh/(n*4*math.pi*u)
#Result
print"Reduction factor is", round(K,3),"A"
#Given
n=40
a=0.12
I=0.15
a1=45 #degree
u=10**-7
#Calculation
import math
Bh=(n*u*4*math.pi*I)/(2.0*a*math.tan(a1*3.14/180.0))
#Result
print"Strength of horizontal component is", round(Bh*10**4,3),"*10**-4 T"
#Given
a1=30
a2=45 #degree
#Calculation
import math
n=2*math.tan(a1*3.14/180.0)/(math.tan(a2*3.14/180.0))
#Result
print"Ratio of number of turns is", round(n,3)
#Given
n=16
a=0.1 #m
i=0.75 #A
Bh=5*10**-2 #T
v=2 #/s
#Calculation
import math
M=n*i*math.pi*a**2
I=M*Bh/(4*math.pi**2*v**2)
#Result
print"Moment of inertia is",round(I*10**4,3),"*10**-4 Kg m**2"
#Given
T1=2.5
T2=4.5
M2=1.5
#Calculation
M=T2**2/(M2*T1**2)
#Result
print"Ratio of magnetic moment is",M
#Given
T1=3.0
T2=4.0
#Calculation
M=(T2**2+T1**2)/(T2**2-T1**2)
#Result
print"Ratio of magnetic moments is",round(M,2)
#Given
a1=35 #Degree
B=0.39
I=1 #A
a=4.0*10**-2
u=10**-7
#Calculation
import math
Bh=B*math.cos(a1*3.14/180.0)
Bv=B*math.sin(a1*3.14/180.0)
B1=(u*2*I*4/a)*10**4
Rh=Bh-B1
R=math.sqrt(Rh**2+Bv**2)
Rh1=Bh+B1
R3=math.sqrt(Rh1**2+Bv**2)
#Result
print"Resultant magnetic field is", round(R3,3),"G"
#Given
M=5.25*10**-2 #J/T
Bh=0.42*10**-4 #T
u=10**-7
#Calculation
r=(u*M/Bh)**0.333
r1=(u*2*M/Bh)**0.333
#Result
print"(a) Distance from the centre of the magnet on its normal bisector is", round(r*10**2,1),"cm"
print"(b) Distance from the centre of the magnet on its axis is",round(r1*10**2,1),"cm"
#Given
I=0.35 #A
n=30
a=12.0*10**-2
u=10**-7
#Calculation
import math
Bh=u*2*math.pi*n*I*0.707/a
#Result
print"(a) Horizontal component of the earth's magnetic field is", round(Bh*10**4,2),"G"
print"(b) The needle will reverse its original direction i.e. it will point east to west."
#given
t1=9 #S
t2=4.5
Bh=0.34*10**-4 #T
u=10**-7
r=0.1 #m
#Calculation
Baxial=Bh*((t1**2/t2**2)-1)
M2=Baxial*r**2/(2*u)
#Result
print"Magnetic moment is", M2*10**-1,"A m**2"