#importing modules
import math
from __future__ import division
#Variable declaration
n=1; #order
d=2.82*10**-10; #spacing(m)
theta=10*math.pi/180; #angle of diffraction(radian)
#Calculations
lamda=2*d*math.sin(theta)/n; #wavelength of X-rays(m)
#Result
print "wavelength of X-rays is",round(lamda*10**10,5),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
n=1; #order
d=3.035*10**-10; #spacing(m)
theta=12*math.pi/180; #angle of diffraction(radian)
#Calculations
lamda=2*d*math.sin(theta)/n; #wavelength of X-rays(m)
#Result
print "wavelength of X-rays is",round(lamda*10**10,3),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
n=1; #order
d=2.81; #spacing(angstrom)
theta1=15.1*math.pi/180; #angle of diffraction(radian)
theta2=17.1*math.pi/180; #angle of diffraction(radian)
#Calculations
lamda1=2*d*math.sin(theta1)/n; #wavelength(angstrom)
lamda2=2*d*math.sin(theta2)/n; #wavelength(angstrom)
#Result
print "their wavelengths are",round(lamda1,3),"angstrom and",round(lamda2,4),"angstrom"
print "answer in the book varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
n=1; #order
lamda=1.54; #wavelength of X-rays(angstrom)
theta=11*math.pi/180; #angle of diffraction(radian)
#Calculations
d=lamda/(2*math.sin(theta)); #spacing(angstrom)
#Result
print "spacing is",round(d,3),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
n1=1; #order
n2=3; #order
theta1=30*math.pi/180; #angle of diffraction(radian)
theta2=60*math.pi/180; #angle of diffraction(radian)
lamdaB=0.92; #wavelength(angstrom)
#Calculations
lamdaA=n2*lamdaB*math.sin(theta1)/math.sin(theta2); #wavelength of line A(angstrom)
#Result
print "wavelength of line A is",round(lamdaA,3),"angstrom"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
n=1; #order
d=0.4086*10**-10; #spacing(m)
theta=65*math.pi/180; #angle of diffraction(radian)
m=9.1*10**-31; #mass(kg)
h=6.6*10**-34; #planks constant(Js)
#Calculations
lamda=2*d*math.sin(theta)/n; #wavelength of electrons(m)
v=h/(m*lamda); #velocity of electrons(m/sec)
#Result
print "wavelength of electrons is",round(lamda*10**10,4),"*10**-10 m"
print "velocity of electrons is",round(v/10**6,3),"*10**6 m/sec"
print "answers given in the book are wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
n=1; #order
d=2.82*10**-10; #spacing(m)
sintheta=1; #angle of diffraction(radian)
#Calculations
lamdamax=2*d*sintheta/n; #longest wavelength(m)
#Result
print "longest wavelength is",lamdamax*10**10,"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
n1=1; #order
n2=3; #order
lamda=0.842*10**-10; #wavelength(m)
theta1=(8+(35/60))*math.pi/180; #angle of diffraction(radian)
#Calculations
theta3=math.asin(n2*math.sin(theta1)); #glancing order(radian)
#Result
print "glancing order is",round(theta3*180/math.pi,3),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
n=1; #order
lamda=0.58; #wavelength of X-rays(angstrom)
theta1=6.45*math.pi/180; #angle of diffraction(radian)
theta2=9.15*math.pi/180; #angle of diffraction(radian)
theta1=13*math.pi/180; #angle of diffraction(radian)
#Calculations
d1=lamda/(2*math.sin(theta1)); #spacing in 1st case(angstrom)
d2=lamda/(2*math.sin(theta2)); #spacing in 2nd case(angstrom)
d3=lamda/(2*math.sin(theta3)); #spacing in 3rd case(angstrom)
#Result"
print "spacing in 1st case is",round(d1,3),"angstrom"
print "spacing in 2nd case is",round(d2,3),"angstrom"
print "spacing in 3rd case is",round(d3,3),"angstrom"
print "answers given in the book are wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
M=58.5; #molecular weight(kg/k-mole)
N=6.02*10**26; #avagadro number(mol/k-mole)
rho=2.16*10**3; #density(kg/m**3)
#Calculations
d=(M/(2*N*rho))**(1/3); #seperation of adjacent atoms(m)
#Result
print "seperation of adjacent atoms is",round(d*10**10,3),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
M=58.454; #molecular weight(kg/k-mole)
n=1; #order
rho=2163; #density(kg/m**3)
lamda=1.3922*10**-10; #wavelength(m)
theta=(14+(27/60)+(26/3600))*math.pi/180; #angle of diffraction(radian)
#Calculations
d=n*lamda/(2*math.sin(theta)); #lattice spacing(m)
N=M/(2*rho*d**3); #avagadro number(mol/k-mole)
#Result
print "lattice spacing is",round(d*10**10,4),"angstrom"
print "avagadro number is",round(N/10**26,3),"*10**26 mol/k-mole"
print "answer in the book varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=0.586*10**-10; #wavelength(m)
theta1=(5+(58/60))*math.pi/180; #angle of diffraction(radian)
theta2=(12+(10/60))*math.pi/180; #angle of diffraction(radian)
theta3=(18+(12/60))*math.pi/180; #angle of diffraction(radian)
#Calculations
a=int(10*math.sin(theta1));
b=int(10*math.sin(theta2));
c=int(10*math.sin(theta3));
d1=a*lamda/(2*math.sin(theta1)); #spacing at first order(m)
d2=b*lamda/(2*math.sin(theta2)); #spacing at second order(m)
d3=c*lamda/(2*math.sin(theta3)); #spacing at third order(m)
d=(d1+d2+d3)/3; #mean value of crystal lattice spacing(m)
#Result
print "orders of reflection is",a,":",b,":",c
print "spacing at first order is",round(d1*10**10,4),"*10**-10 m"
print "spacing at second order is",round(d2*10**10,4),"*10**10 m"
print "spacing at third order is",round(d3*10**10,4),"*10**-10 m"
print "mean value of crystal lattice spacing is",round(d*10**10,3),"*10**-10 m"
print "answers given in the book vary due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
theta1=(5+(23/60))*math.pi/180; #angle of diffraction(radian)
theta2=(7+(37/60))*math.pi/180; #angle of diffraction(radian)
theta3=(9+(25/60))*math.pi/180; #angle of diffraction(radian)
#Calculations
d1=math.sin(theta1); #spacing at first order(m)
d2=math.sin(theta2); #spacing at second order(m)
d3=math.sin(theta3); #spacing at third order(m)
x=d1/d1;
y=round(d2/(d1*math.sqrt(2)));
z=round(d3/(math.sqrt(3)*d1));
#Result
print "ratio of spacing is",int(x),":",int(y),"*math.sqrt(2) :",int(z),"*math.sqrt(3)"
print "the crystal is simple cubic crystal"
#importing modules
import math
from __future__ import division
#Variable declaration
M=58.46; #molecular weight(kg/k-mole)
N=6.02*10**26; #avagadro number(mol/k-mole)
rho=2170; #density(kg/m**3)
theta=6*math.pi/180; #angle of diffraction(radian)
n=1; #order
#Calculations
d=(M/(2*N*rho))**(1/3); #seperation of adjacent atoms(m)
lamda=2*d*math.sin(theta)/n; #wavelength of Kalpha(m)
#Result
print "wavelength of Kalpha is",round(lamda*10**10,3),"angstrom"
print "answer given in the book is wrong due to printing mistake"
#importing modules
import math
from __future__ import division
#Variable declaration
e=1.6*10**-19; #charge(coulomb)
E=344; #energy(V)
theta=60*math.pi/180; #angle of diffraction(radian)
n=1; #order
m=9*10**-31; #mass(kg)
h=6.62*10**-34; #planks constant(Js)
#Calculations
lamda=h/math.sqrt(2*m*e*E); #wavelength(m)
d=n*lamda/(2*math.sin(theta)); #spacing of crystal(m)
#Result
print "spacing of crystal is",round(d*10**10,2),"angstrom"