#importing modules
import math
from __future__ import division
#Variable declaration
a=1/2;
b=1/3;
c=1/4; #intercepts along the three axes
#Calculations
def lcm(x, y):
if x > y:
greater = x
else:
greater = y
while(True):
if((greater % x == 0) and (greater % y == 0)):
lcm = greater
break
greater += 1
return lcm
z=lcm(1/a,1/b);
lcm=lcm(z,1/c);
h=a*lcm;
k=b*lcm;
l=c*lcm; #miller indices of plane
#Result
print "miller indices of plane are (",int(h),int(k),int(l),")"
#importing modules
import math
from __future__ import division
#Variable declaration
a=1/2;
b=1/3;
x=float("inf");
c=1/x; #intercepts along the three axes
#Calculations
def lcm(x, y):
if x > y:
greater = x
else:
greater = y
while(True):
if((greater % x == 0) and (greater % y == 0)):
lcm = greater
break
greater += 1
return lcm
lcm=lcm(1/a,1/b);
h=a*lcm;
k=b*lcm;
l=c*lcm; #miller indices of plane
#Result
print "miller indices of plane are (",int(h),int(k),int(l),")"
#importing modules
import math
from __future__ import division
#Variable declaration
a=1/1;
b=1/2;
c=1/3; #intercepts along the three axes
#Calculations
def lcm(x, y):
if x > y:
greater = x
else:
greater = y
while(True):
if((greater % x == 0) and (greater % y == 0)):
lcm = greater
break
greater += 1
return lcm
z=lcm(1/a,1/b);
lcm=lcm(z,1/c);
h=a*lcm;
k=b*lcm;
l=c*lcm; #miller indices of plane
#Result
print "miller indices of plane are (",int(h),int(k),int(l),")"
#importing modules
import math
from __future__ import division
#Variable declaration
a=1.1;
b=1.2;
c=1.3; #intercepts along the three axes(angstrom)
h=2;
k=3;
l=4; #miller indices of plane
#Calculations
l1=a*h/h;
l2=b*h/k; #corresponding intercept on Y-axis(angstrom)
l3=c*h/l; #corresponding intercept on Z-axis(angstrom)
#Result
print "corresponding intercept on Y-axis and Z-axis are",l2,"angstrom and",l3,"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
a=1/1;
b=-1/3;
c=1/2; #intercepts along the three axes
#Calculations
def lcm(x, y):
if x > y:
greater = x
else:
greater = y
while(True):
if((greater % x == 0) and (greater % y == 0)):
lcm = greater
break
greater += 1
return lcm
z=lcm(1/a,1/b);
lcm=lcm(z,1/c);
h=a*lcm;
k=b*lcm;
l=c*lcm; #miller indices of plane
#Result
print "miller indices of plane are (",int(h),int(k),int(l),")"
#importing modules
import math
from __future__ import division
#Variable declaration
n=4; #number of molecules per unit cell
M=63.5; #molecular weight
N=6.02*10**26; #avagadro number(kg mol-1)
rho=8.96*10**3; #density(kg/m**3)
#Calculations
a=(n*M/(rho*N))**(1/3); #lattice constant(m)
a=round(a*10**10,2); #lattice constant(angstrom)
d=a/math.sqrt(2); #distance between two nearest copper atoms(angstrom)
#Result
print "lattice constant is",a,"angstrom"
print "distance between two nearest copper atoms is",round(d,2),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
n=2; #number of molecules per unit cell
M=55.85; #molecular weight
N=6.02*10**26; #avagadro number(kg mol-1)
rho=7860; #density(kg/m**3)
#Calculations
a=(n*M/(rho*N))**(1/3); #lattice constant(m)
#Result
print "lattice constant is",round(a*10**10,4),"angstrom"