#importing modules
import math
from __future__ import division
#Variable declaration
mewB=9.27*10**-24;
B=3; #magnetic field(T)
e=1.6*10**-19; #conversion factor from J to eV
#Calculation
E=2*mewB*B/e; #energy difference(eV)
#Result
print "energy difference is",round(E*10**4,2),"*10**-4 eV"
#importing modules
import math
from __future__ import division
#Variable declaration
l=2;
s=1/2;
j1=2+(1/2);
j2=2-(1/2);
#Calculation
L=math.sqrt(l*(l+1)); #value of L(hbar)
S=math.sqrt(s*(s+1)); #value of S(hbar)
J1=math.sqrt(j1*(j1+1)); #value of J for D5/2 state(hbar)
J2=math.sqrt(j2*(j2+1)); #value of J for D3/2 state(hbar)
costheta1=((j1*(j1+1))-(l*(l+1))-(s*(s+1)))/(2*L*S);
theta1=math.acos(costheta1); #angle between L and S for D5/2(radian)
theta1=theta1*180/math.pi; #angle between L and S for D5/2(degrees)
costheta2=((j2*(j2+1))-(l*(l+1))-(s*(s+1)))/(2*L*S);
theta2=math.acos(costheta2); #angle between L and S for D3/2(radian)
theta2=theta2*180/math.pi; #angle between L and S for D3/2(degrees)
#Result
print "value of L is",round(L,3),"hbar"
print "value of S is",round(S,3),"hbar"
print "value of J for D5/2 state is",round(J1,3),"hbar"
print "value of J for D3/2 state is",round(J2,3),"hbar"
print "angle between L and S for D5/2 is",round(theta1,2),"degrees"
print "angle between L and S for D3/2 is",int(theta2),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
S=1;
L=1;
J=1;
#Calculation
a=L*(L+1)-(L*(L+1));
g1=1+(a/(2*L*(L+1))); #lande's g-factor for pure orbital angular momentum
b=(S*(S+1)+(S*(S+1)))/(2*S*(S+1)); #lande's g-factor for pure spin angular momentum
g2=1+b; #lande's g-factor for pure spin angular momentum
c=J*(J+1)+(S*(S+1))-(L*(L+1));
g3=1+(c/(2*J*(J+1))); #lande's g-factor for state 3P1
#Result
print "lande's g-factor for pure orbital angular momentum is",g1
print "ande's g-factor for pure spin angular momentum is",g2
print "lande's g-factor for state 3P1 is",g3
#importing modules
import math
from __future__ import division
#Variable declaration
EKalpha=21.99; #energy in silver(keV)
EKbita=25.145; #energy in silver(keV)
E=-25.514; #energy of n=1 state(keV)
#Calculation
ELalpha=EKbita-EKalpha; #energy of L alpha X ray(keV)
E2=-E-EKalpha; #binding energy of L electron(keV)
#Result
print "energy of L alpha X ray is",ELalpha,"keV"
print "binding energy of L electron is",E2,"keV"
#importing modules
import math
from __future__ import division
#Variable declaration
h=6.626*10**-34; #planck's constant(Js)
c=3*10**8; #velocity of light(m/sec)
Z=11; #atomic number
R=1.097*10**7; #value of R(per m)
#Calculation
E=(3*h*c*R*(Z-1)**2)/4; #energy of k aplha X-ray(keV)
#Result
print "energy of k aplha X-ray is",round(E*10**16,2),"*10**-16 keV"
print "answer given in the book is wrong"