#import modules
import math
from __future__ import division
#Variable declaration
d=2180; #density of NaCl(kg/m^3)
M=23+35.5; #Molecular weight of NaCl(gm)
Na=6.02*10**26; #Avgraodo no(per kg mole)
n=4; #for f.c.c
#calculation
a=(n*M/(Na*d))**(1/3); #lattice constant(m)
d=a/2; #distance(m)
d=d*10**10; #distance(angstrom)
d=math.ceil(d*10**3)/10**3; #rounding off to 3 decimals
#Result
print "distance between two adajcent atoms is",d,"angstrom"
#import modules
import math
from __future__ import division
#Variable declaration
d=2.163; #density(gm/cm^3)
M=58.45; #molecular weight(gm)
Na=6.02*10**23; #Avgraodo no.(molecules/gm mole)
#calcualtion
n=Na/M; #no. of molecules(per gram)
n=n*d; #no. of molecules(per cm^3)
n=2*n; #no. of atom(per cm^3)
n=n**(1/3); #no. of atoms in a row 1cm long
d=1/n; #spacing between atoms(cm)
#Result
print "spacing between atoms is",round(d/1e-8,2),"angstrom"
print "answer in the book varies due to rounding off errors"
#import modules
import math
from __future__ import division
#Variable declaration
r=1.278; #radius(A.U)
n=4; #structure is f.c.c
M=63.54; #atomic weight(gm)
Na=6.02*10**23; #Avgraodo no.(per gm mole)
#calculation
a=4*r/(math.sqrt(2)); #lattice constant(A.U)
V=a**3; #volume(cm^3)
rho=n*M/(Na*V); #density(gm/cm^3)
rho=rho*(10**8)**3 #density(gm/m^3)
#Result
print "Density is",round(rho,2),"g/m^3"
print "answer in the textbook varies due to rounding off errors"
#import modules
import math
from __future__ import division
#Vaiable declaration
r=1.746; #atomic radius(AU)
#calulation
a=4*r/math.sqrt(2); #lattice constant(AU)
#for (200)
h=2;k=0;l=0;
d=a/math.sqrt(h**2+k**2+l**2); #interplanar spacing(AU)
#for (220)
h=2;k=2;l=0;
d1=a/math.sqrt(h**2+k**2+l**2); #interplanar spacing(AU)
#for (111)
h=1;k=1;l=1;
d2=a/math.sqrt(h**2+k**2+l**2); #interplanar spacing(AU)
d=math.ceil(d*10**4)/10**4; #rounding off to 4 decimals
d1=math.ceil(d1*10**3)/10**3; #rounding off to 3 decimals
d2=math.ceil(d2*10**3)/10**3; #rounding off to 3 decimals
#Result
print "spacing for (200) is",d,"A.U"
print "answer in the book varies in 3rd decimal due to rounding off errors"
print "spacing for (220) is",d1,"A.U"
print "spacing for (111) is",d2,"A.U"
#import modules
import math
from __future__ import division
#calculation
#for (i)
l=1;m=0;n=0;
p=0;q=1;r=0;
d=math.acos(((l*p)+(m*q)+(n*r))/(math.sqrt(l**2+m**2+n**2)*math.sqrt(p**2+q**2+r**2))); #angle between 2 normals(radian)
theta=math.degrees(d); #angle between 2 normals(degrees)
#for (ii)
l=1;m=2;n=1;
p=1;q=1;r=1;
d1=math.acos(((l*p)+(m*q)+(n*r))/(math.sqrt(l**2+m**2+n**2)*math.sqrt(p**2+q**2+r**2))); #angle between 2 normals(radian)
theta1=math.degrees(d1); #angle between 2 normals(degrees)
deg=int(theta1); #angle(degrees)
t=60*(theta1-deg);
m=int(t); #angle(minutes)
#Result
print "angle between the normal to pair of miller incdices (100) and (010) is",theta,"degrees"
print "angle between the normal to pair of miller incdices (121) and (111) is",deg,"degrees",m,"minutes"
#import modules
import math
from __future__ import division
#variable declaration
a=3.61*10**-7; #lattice constant(mm)
#Calcualtion
#for plane (100)
SA=a*a; #surface area(mm^2)
tamc=2; #total atoms included
ans=tamc/SA; #number of atoms per mm^2
#for (ii) plane (110)
A=a*(math.sqrt(2)*a); #area of the plane(mm^2)
tamc=2; #total atoms included according to sketch
ans1=tamc/A; #number of atoms per mm^2
#for (iii) plane (111)
A=0.866*a*a; #area of the plane(mm^2)
tamc=2; #total atoms included according to sketch
ans2=tamc/A; #number of atoms per mm^2
#Result
print "atoms per mm^2 for (100) is",round(ans/1e+13,3),"*10**13 atoms/mm^2"
print "atoms per mm^2 for (110) is",round(ans1/1e+13,3),"*10**13 atoms/mm^2"
print "atoms per mm^2 for (111) is",round(ans2/1e+13,3),"*10**13 atoms/mm^2"
print "answer for plane (111) given in the book is wrong"