l1=2.0
l2=3.0
l3=2.0
r1=1/l1
r2=1/l2
r3=1/l3
m1=6*r1
m2=6*r2
m3=6*r3
print"Miller indices of the given plane are",m1,m2,m3
l1=1.0
l2=2.0
l3=0
r1=1/l1
r2=1/l2
r3=0
m1=2*r1
m2=2*r2
m3=2*r3
print"Miller indices of the given plane are",m1,m2,m3
V=3*(10**22) #kg/m**3, density of SCC lattice
p=(1/3.0)*10**-22
n=1 #no. of lattice point
a=(n*p)**(1/3.0) #lattice constant
r=(a*10**8/2)
print"Lattice constant is",round(a*10**8,2),"A"
print"radius of simple lattice is",round(r,2),"A"
import math
r=1.278 #in Angstrum
AtomicWeight=63.5 #constant
AvogadroNo=6.023*10**23 #constant
a=4*r*10**-10/math.sqrt(2) #in meter
V=a**3 #in meter**3
m=AtomicWeight/AvogadroNo #in gm
m=m/1000 #in Kg
n=4 # no. of atoms per unit cell for FCC structure
rho=m*n/V #in Kg/m**3
print "Density of crystal is",round(rho,2),"Kg/m**3"
n=4 # no. of atoms per unit cell of silicon
AtomicWeight=28 #constant
AvogadroNo=6.021*10**23 #constant
m=AtomicWeight/AvogadroNo #in gm
m=m/1000 #in Kg
a=5.3 #lattice constant in Angstrum
a=a*10**-10 #in meter
V=a**3 #in meter**3
rho=m*n/V #in Kg/m**3
print"Density of silicon crystal is",round(rho,0),"Kg/m**3"
a=4.75 #lattice constant in Angstrum
a=a*10**-10 #in meter
dp=2.31/a**2 #in atom/m**2
dp=dp/10**6 #in atom/mm**2
print "Surface density in FCC on (111)Plane is %.e",dp,"atoms/mm**2"
import math
l=1.539 #in Angstrum
theta=22.5 #in degree
n=1 #order unitless
d=n*l/(2*math.sin(theta*math.pi/180)) #in Angstrum
print "Interpolar distance in Angstrum ",round(d,2),"A"
import math
theta=16.8/2.0 #in degree
n=2.0 #order unitless
d=0.4 #in nm
l=(2*d*10**-9*sin(theta*math.pi/180.0))/n #in Angstrum
print "wavelength of X-rays in Angstrum ",round(l*10**10,3),"A"