#Given
F=14.4*10**-4 #N
r=0.05 #m
u=10.0**-7
F1=1.6*10**-4 #N
#Calculation
import math
m=math.sqrt(F*r**2/u)
r1=math.sqrt(u*6*6/F1)
#Result
print"Distance between the poles is", r1,"m"
#Given
F=0.8*10**-3
r=0.1 #m
g=9.8
u=10.0**-7
#Calculation
import math
m=math.sqrt(F*g*r**2/(u*5.0))
a=5*m
#Result
print"Strength of each pole is", round(a,1),"A m"
#Given
m=50 #Am
r=0.2 #m
l=0.05 #M
M=5 #Am**2
u=10**-7
#Calculation
Baxial=u*2*M*r/((r**2-l**2)**2)
Bequi=u*M/((r**2+l**2)**1.5)
#Result
print"(i) Magnetic field at a distance of 0.2 m from its centre on axial line is",round(Baxial*10**4,2),"*10**-4 T"
print"(ii) Magnetic field at a distance of 0.2 m from its centre on its equitorial line is",round(Bequi*10**5,3)*10**-5,"T"
#Given
M=12.5 #Am**2
OP=0.05 #m
u=10**-7
#Calculation
import math
b1=(u*2*M)/(OP**3)
b2=(u*M)/(OP**3)
B=math.sqrt(b1**2+b2**2)
a=b2/b1
a1=math.atan(a*180/3.14)
#Result
print"Magnetic field at a point midway between two magnets is",round(B*10**2,3),"10**-2 T"
#Given
B=0.3 #T
A=30 #Degree
t=0.06 #Nn
#Calculation
import math
M=t/(B*math.sin(A*3.14/180.0))
#Result
print"Magnetic moment is",round(M,1),"Am**2"
#Given
m=48 #Am
l=0.25 #m
a=30 #degree
B=0.15
#Calculation
import math
M=m*l
T=M*B*math.sin(a*3.14/180.0)
#Result
print"(i) Magnetic moment is",M,"Am**2"
print"(ii) Torque is",round(T,1),"Mm"
#Given
B=0.2 #t
a=30
t=0.06
#Calculation
import math
M=t/(B*math.sin(a*3.14/180.0))
#Result
print"(a) Magnetic moment is",round(M,1),"An**2"
print"(b) When the magnet aligns itself parallel to the magnetic field"
#Given
M=1.5 #J/T
B=0.22 #T
a=0
a1=90
#Calculation
import math
W=M*B*(math.cos(a*3.14/180.0)-math.cos(a1*3.14/180.0))
t=M*B*math.sin(a1*3.14/180.0)
#Result
print"Amount of work required is", round(W,2),"J"
print"Torque is",round(t,2),"Nm"
#Given
n=50
a=0.2
I=12 #A
u=10**-7
#Calculation
import math
B=u*2*math.pi*n*I/a
M=n*I*math.pi*a**2
#Result
print"(a) Magnetic moment at the centre is",round(B*10**3,3),"*10**-3 T"
print"(b) Magnetic moment associated is",round(M,1),"Am**2"
#Given
r=0.53*10**-10 #m
v=6.8*10**15 #Kz
e=1.6*10**-19 #C
#Calculation
import math
M=math.pi*e*v*r**2
#Result
print"Magnetic moment is",round(M*10**24,1)*10**-24,"A m**2"
#Given
M=1.8*10**-23 #Am**2
v=5*10**-6 #m**3
a=7.8*10**3
N=6.02*10**26
A=56.0
B=1.5 #T
a1=90 #degree
#Calculation
import math
m=v*a
n=N*m/A
M1=M*n
t=M1*B*math.sin(a1*3.14/180.0)
#Result
print"(a) Magnetic moment is", round(M1,2),"A m**2"
print"(b) Torque required is",round(t,2),"N m"
#Given
B1=1.2*10**-2 #T
a=15 #degree
a2=60
#Calculation
a3=a2-a
B2=B1*math.sin(a*3.14/180.0)/(math.sin(a3*3.14/180.0))
#Result
print round(B2*10**3,2),"*10**-3 T"
#Given
n=1000
I=2 #A
A=2*10**-4 #m**@
a=30
B=0.16
a1=0 #degree
a2=180
#Calculation
import math
M=I*A*n
t=M*B*math.sin(a*3.14/180.0)
W=M*B*(math.cos(a1*3.14/180.0)-math.cos(a2*3.14/180.0))
#Result
print"(a) Torque required is", round(t,3),"Nm"
print"(b) Work needed is",round(W,3),"J"