#importing modules
import math
from __future__ import division
#Variable declaration
new=5.6*10**12; #frequency(Hz)
h=6.625*10**-34; #plank constant
kB=1.38*10**-23; #boltzmann constant
T=330; #temperature(K)
#Calculation
x=h*new/(kB*T);
E=h*new/(math.exp(x)-1); #average energy of oscillator(joule)
#Result
print "average energy of oscillator is",round(E*10**21,3),"*10**-21 joule"
print "answer given in the book varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
h=6.63*10**-34; #plank constant
kB=1.38*10**-23; #boltzmann constant
T=1500; #temperature(K)
c=3*10**8; #velocity of light(m/sec)
lamda=6000*10**-10; #wavelength(m)
#Calculation
new=c/lamda;
x=h*new/(kB*T);
y=math.exp(x)-1; #average energy of oscillator(joule)
Ulamda=8*math.pi*h*new/(y*lamda**4); #energy density per unit wavelength(Jm-4)
#Result
print "energy density per unit wavelength is",round(Ulamda,2),"Jm-4"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
e=1.6*10**-19; #charge(c)
m=9.1*10**-31; #mass(kg)
h=6.63*10**-34; #plank constant
E=2000; #energy(eV)
#Calculation
lamda=h/math.sqrt(2*m*E*e); #wavelength(m)
#Result
print "wavelength is",round(lamda*10**9,4),"nm"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=1.66*10**-10; #wavelength(m)
m=9.1*10**-31; #mass(kg)
e=1.6*10**-19; #charge(c)
h=6.63*10**-34; #plank constant
#Calculation
E=h**2/(2*m*e*lamda**2); #kinetic energy(eV)
v=h/(m*lamda); #velocity(m/s)
#Result
print "velocity is",round(v*10**-4,1),"*10**4 m/s"
print "kinetic energy is",round(E,2),"eV"
print "answer for energy given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
L=1*10**-10; #length(m)
n2=2;
n3=3;
m=9.1*10**-31; #mass(kg)
e=1.6*10**-19; #charge(c)
h=6.63*10**-34; #plank constant
#Calculation
E1=h**2/(8*m*e*L**2); #ground state energy(eV)
E2=n2**2*E1; #energy of 1st excited state(eV)
E3=n3**2*E1; #energy of 2nd excited state(eV)
#Result
print "ground state energy is",round(E1,4),"eV"
print "energy of 1st excited state is",round(E2,2),"eV"
print "energy of 2nd excited state is",round(E3,4),"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
L=4*10**-10; #length(m)
m=9.1*10**-31; #mass(kg)
e=1.6*10**-19; #charge(c)
h=6.63*10**-34; #plank constant
#Calculation
E1=h**2/(8*m*e*L**2); #minimum energy(eV)
#Result
print "minimum energy is",round(E1,4),"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
V=15*10**3; #accelerated voltage(V)
#Calculation
lamda=1.227/math.sqrt(V); #wavelength of electron waves(nm)
#Result
print "wavelength of electron waves is",round(lamda,2),"nm"
#importing modules
import math
from __future__ import division
#Variable declaration
L=0.05*10**-9; #length(m)
m=9.1*10**-31; #mass(kg)
e=1.6*10**-19; #charge(c)
h=6.63*10**-34; #plank constant
#Calculation
E1=h**2/(8*m*e*L**2); #minimum energy(eV)
#Result
print "minimum energy is",round(E1,2),"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
L=3*10**-10; #length(m)
m=9.1*10**-31; #mass(kg)
e=1.6*10**-19; #charge(c)
h=6.63*10**-34; #plank constant
#Calculation
E1=h**2/(8*m*e*L**2); #minimum energy(eV)
#Result
print "minimum energy is",round(E1,1),"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
me=9.1*10**-31; #mass(kg)
h=6.63*10**-34; #plank constant
mn=1.676*10**-27; #mass(kg)
#Calculation
lamdan=h*10**9/math.sqrt(4*mn*me); #de broglie wavelength(nm)
#Result
print "de broglie wavelength is",int(lamdan),"nm"
#importing modules
import math
from __future__ import division
#Variable declaration
L=2*10**-10; #length(m)
n2=2;
n4=4;
m=9.1*10**-31; #mass(kg)
e=1.6*10**-19; #charge(c)
h=6.63*10**-34; #plank constant
#Calculation
E1=h**2/(8*m*e*L**2); #minimum energy(eV)
E2=n2**2*E1; #energy of 1st excited state(eV)
E4=n4**2*E1; #energy of 2nd excited state(eV)
#Result
print "ground state energy is",round(E1,2),"eV"
print "energy of 1st excited state is",round(E2,3),"eV"
print "energy of 2nd excited state is",round(E4,2),"eV"
print "answers for energy of 1st and 2nd states given in the book are wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
n=1;
e=1.6*10**-19; #charge(c)
m=9.1*10**-31; #mass(kg)
h=6.63*10**-34; #plank constant
V=344; #energy(eV)
theta=60*math.pi/180; #angle(radian)
#Calculation
d=h*10**10/(2*math.sin(theta)*math.sqrt(2*m*V*e)); #spacing of crystal(angstrom)
#Result
print "spacing of crystal is",round(d,3),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
L=1*10**-10; #length(m)
n3=3;
m=9.11*10**-31; #mass(kg)
e=1.6*10**-19; #charge(c)
h=6.63*10**-34; #plank constant
#Calculation
E1=h**2/(8*m*e*L**2); #ground state energy(eV)
E3=n3**2*E1; #energy of 2nd excited state(eV)
E=E3-E1; #energy required to pump an electron(eV)
#Result
print "ground state energy is",round(E1,3),"eV"
print "energy of 2nd excited state is",round(E3,2),"eV"
print "energy required to pump an electron is",round(E,2),"eV"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
L=2*10**-10; #length(m)
m=9.1*10**-31; #mass(kg)
e=1.6*10**-19; #charge(c)
h=6.63*10**-34; #plank constant
#Calculation
E1=h**2/(8*m*e*L**2); #minimum energy(eV)
#Result
print "minimum energy is",round(E1,2),"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
V=1600; #accelerated voltage(V)
#Calculation
lamda=1.227*10/math.sqrt(V); #wavelength of electron waves(angstrom)
#Result
print "wavelength of electron waves is",round(lamda,2),"angstrom"