#Given
q=1.6*10**-19 #c
B=0.1 #T
v=5.0*10**6 #m/s
a=90 #degree
#Calculation
import math
Fm=q*v*B*math.sin(a)
#Result
print"Force on the proton is", round(Fm*10**14,1)*10**-14,"N"
#Given
n=1.0*10**29 #m**-3
e=1.6*10**-19 #C
A=2*10**-6 #m**2
I=5 #A
B=0.15 #T
a=90 #degree
#Calculation
import math
Vd=I/(n*e*A)
Fm=e*Vd*B*math.sin(a)
#Result
print"Force acting on each electron is", round(Fm*10**24,2)*10**-24,"N"
#Given
q=2*1.6*10**-19 #C
v=6*10**5 #m/s
B=0.2 #T
a=90 #degree
m=6.65*10**-27
#Calculation
import math
Fm=q*v*B*math.sin(a)
a=Fm/m
#Result
print"Force on alpha particle is", round(Fm*10**14,2)*10**-14,"N"
print"Acceleration of alpha particle is",round(a*10**-12,2)*10**12,"m/s**2"
#Given
a=60 #degree
u=4*3.14*10**-7 #T/A m
Bc=2
#Calculation
import math
a=(Bc/2.0)/(math.tan(60)*180/3.14)
B1=(10**-7*math.tan(60)*(math.sin(60*180/3.14)+math.sin(60*180/3.14)))*10
B=3*B1
#Result
print"Magnetic fieldat the centroid of the triangle is", round(B*10**7,0),"*10**-7 T"
#Given
n=20
I=1 #A
r=0.08 #m
u=4*3.14*10**-7 #T/A m
#Calculation
B=u*n*I/(2*r)
#Result
print"Magnitude of the magnetic field is", B*10**4,"*10*4 T"
#Given
u=10**-7
I=10*10**-2 #A
r=0.5
#Calculation
B=u*I/r**2
#Result
print"Magnetic field on Y axis is", B,"K^ T"
#Given
I=5 #A
l=0.01 #m
a=45 #degree
r=2 #m
u=10**-7
#Calculation
import math
B=(u*I*l*math.sin(a)*180/3.14)/r**2
#Result
print"Magnetic field is", round(B*10**8,1)*10**-10,"T"
#Given
u=4*3.14*10**-7 #T/A m
n=20
I=12 #A
r=0.1 #m
#Calculation
B=u*n*I/(2*r)
#Result
print"Magnetic field at the centre of coil is", round(B*10**3,1),"*10**-3 T"
#Given
r=0.02 #m
#Calculation
B=u*I/(4*r)
#Result
print"The magnitude of magnetic field is", round(B*10**4,2),"*10**-4 T"
#Given
v=4*10**6
r=0.5*10**-10
e=1.6*10**-19
t=1
#Calculation
import math
f=v/(2.0*math.pi*r)
I=f*e/t
B=u*I/(2*r)
#Result
print"Magnetic field produced by the electrons is", round(B,1),"T"
#Given
n=100
I=5 #A
r=0.1 #m
x=0.05
#Calculation
B=u*n*I/(2*r)
B1=(u*n*I*r**2)/(2.0*(r**2+x**2)**1.5)
#Result
print"(i) Magnetic field at the centre of the coil is",B*10**3,"*10**-3 T"
print"(ii) The magnetic field at the point on the axis of the coil is",round(B1*10**3,2),"*10**-3 T"
#Given
a=5*10**-2
I=50
e=1.6*10**-19
B1=10**7
#Calculation
import math
B=u*I/(2*math.pi*a)
F=e*B1*B
#Result
print"(i) Force on electron when velocity is towards the wire", round(F*10**16,1)*10**-16,"N"
print"(ii) Force on electron when velocity is parallel to the wire", round(F*10**16,1)*10**-16,"N"
print"(iii) Force on electron when velocity is perpendicular to the wire is zero"
#Given
e=1.6*10**-19
f=6.8*10**15
r=0.51*10**-10
#Calculation
import math
I=e*f
B=(u*I)/(2*r)
M=1*I*math.pi*r**2
#Result
print"The effective dipole moment is",round(M*10**24,0)*10**-24,"Am**2"
#Given
n=5*850/1.23
I=5.57 #A
#calculation
u=4*math.pi*10**-7
B=u*n*I
#Result
print"Magnitude of magnetic field is", round(B*10**3,1),"*10**-3 T"
#Given
r1=20
r2=25
I=2 #a
#Calculation
import math
r=(r1+r2)/2.0
l=(2*math.pi*r)*10**-2
n=1500/l
B=u*n*I
#Result
print"(i) Magnetic field inside the toroid is", round(B,3),"T"
print"(ii) magnetic field outside the toroid is zero"
#Given
I=2 #A
R=5*10**-2 #m
r=3*10**-2 #m
#Calculation
import math
B=u*I*r/(2*math.pi*R**2)
#Result
print round(B*10**6,1),"*10**-6 T"