#importing modules
import math
from __future__ import division
#Variable declaration
c = 3*10**8 #velocity of light(m/sec)
m = 1.67*10**-27 #mass of proton(kg)
h = 6.626*10**-34 #planck's constant
#Calculation
v = (1/10)*c #velocity of proton(m/sec)
lamda = h/(m*v) #de Broglie wavelength(m)
#Result
print "de Broglie wavelength of proton is",round(lamda/1e-14,3),"*10^-14 m"
#importing modules
import math
from __future__ import division
#Variable declaration
V = 400 #potential(V)
#Calculation
lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)
#Result
print "de Broglie wavelength of electron is",lamda,"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
m = 1.674*10**-27 #mass of neutron(kg)
h = 6.626*10**-34 #planck's constant
e = 1.6*10**-19
KE = 0.025 #kinetic energy(eV)
#Calculation
E = KE*e #kinetic energy(J)
lamda = h/math.sqrt(2*m*E) #de Broglie wavelength(m)
lamda_nm = lamda*10**9 #de Broglie wavelength(nm)
lamda_nm = math.ceil(lamda_nm*10**4)/10**4 #rounding off to 4 decimals
#Result
print "de Broglie wavelength is",lamda_nm,"nm"
#importing modules
import math
from __future__ import division
#Variable declaration
V = 1600 #potential(V)
#Calculation
lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)
#Result
print "de Broglie wavelength of electron is",lamda,"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
delta_x = 0.2 #electron distance(angstrom)
h = 6.626*10**-34 #planck's constant
#Calculation
delta_x = delta_x*10**-10 #electron distance(m)
delta_p = h/(2*math.pi*delta_x) #uncertainity in momentum(kg.m/s)
#Result
print "uncertainity in momentum is",round(delta_p/1e-24,3),"*10^-24 kg m/s"
#importing modules
import math
from __future__ import division
#Variable declaration
n1 = 1
n2 = 1
n3 = 1 #for lowest energy
e = 1.6*10**-19
h = 6.62*10**-34 #planck's constant
m = 9.1*10**-31 #mass of electron(kg)
L = 0.1 #side of box(nm)
#Calculation
L = L*10**-9 #side of box(m)
E1 = h**2*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)
E1 = E1/e #lowest energy(eV)
E1 = math.ceil(E1*10)/10 #rounding off to 1 decimal
#Result
print "lowest energy of electron is",E1,"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
n1 = 1
n2 = 1
n3 = 2 #for level next to the lowest
e = 1.6*10**-19
h = 6.62*10**-34 #planck's constant
m = 9.1*10**-31 #mass of electron(kg)
L = 0.1 #side of box(nm)
#Calculation
L = L*10**-9 #side of box(m)
E1 = h**2*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)
E1 = E1/e #lowest energy(eV)
E1 = math.ceil(E1*10**2)/10**2 #rounding off to 2 decimals
#Result
print "energy of electron is",E1,"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
m = 9.1*10**-31 #mass of electron(kg)
h = 6.626*10**-34 #planck's constant
e = 1.6*10**-19
E = 2000 #energy(eV)
#Calculation
E = E*e #energy(J)
lamda = h/math.sqrt(2*m*E) #wavelength(m)
lamda_nm = lamda*10**9 #velength(nm)
lamda_nm = math.ceil(lamda_nm*10**4)/10**4 #rounding off to 4 decimals
#Result
print "wavelength is",lamda_nm,"nm"
#importing modules
import math
from __future__ import division
#Variable declaration
n = 1 #for minimum energy
h = 6.626*10**-34 #planck's constant(J sec)
m = 9.91*10**-31 #mass of electron(kg)
L = 4*10**-10 #side of box(m)
#Calculation
E1 = ((h**2)*(n**2))/(8*m*(L**2)) #lowest energy(J)
E1 = E1*10**18;
E1 = math.ceil(E1*10**4)/10**4 #rounding off to 4 decimals
#Result
print "energy of electron is",E1,"*10**-18 J"
#importing modules
import math
from __future__ import division
#Variable declaration
n1 = 1 #for ground state
n2 = 2 #for 1st excited state
n3 = 3 #for 2nd excited state
h = 6.626*10**-34 #planck's constant(J sec)
m = 9.1*10**-31 #mass of electron(kg)
L = 1*10**-10 #width(m)
#Calculation
E1 = h**2*n1**2/(8*m*L**2) #energy in ground state(J)
E2 = n2**2*E1 #energy in 1st excited state(J)
E3 = n3**2*E1 #energy in 2nd excited state(J)
#Result
print "energy in ground state is",round(E1/1e-18,3),"*10^-18 J"
print "energy in 1st excited state is",round(E2/1e-17,3),"*10^-17 J"
print "energy in 2nd excited state is",round(E3/1e-17,3),"*10^-17 J"
#importing modules
import math
from __future__ import division
#Variable declaration
h = 6.626*10**-34 #planck's constant(J sec)
m = 9.1*10**-31 #mass of electron(kg)
e = 1.6*10**-19
lamda = 1.66*10**-10 #wavelength(m)
#Calculation
v = h/(m*lamda) #velocity of electron(m/sec)
v_km = v*10**-3 #velocity of electron(km/sec)
KE = (1/2)*m*v**2 #kinetic energy(J)
KE_eV = KE/e #kinetic energy(eV)
KE_eV = math.ceil(KE_eV*10**3)/10**3 #rounding off to 3 decimals
#Result
print "velocity of electron is",int(v_km),"km/sec"
print "kinetic energy of electron is",KE_eV,"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
V = 15 #potential(kV)
#Calculation
V = V*10**3 #potential(V)
lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)
lamda = math.ceil(lamda*100)/100 #rounding off to 2 decimals
#Result
print "wavelength of electron waves is",lamda,"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
V = 344 #potential(V)
n = 1 #for 1st reflection maximum
theta = 60 #glancing angle(degrees)
#Calculation
lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)
lamda_m = lamda*10**-10 #de Broglie wavelength(m)
theta = theta*math.pi/180 ##glancing angle(radians)
d = n*lamda_m/(2*math.sin(theta)) #interatomic spacing(m)
d = d*10**10 #interatomic spacing(angstrom)
d = math.ceil(d*10**5)/10**5 #rounding off to 5 decimals
#Result
print "interatomic spacing of crystal is",d,"angstrom"