#importing modules
import math
from __future__ import division
#Variable declaration
V=344; #voltage(V)
theta=40; #angle(degrees)
n=1;
#Calculation
lamda=12.26/math.sqrt(V); #deBroglie wavelength(angstrom)
theta=((180-theta)/2)*math.pi/180; #angle(radian)
d=n*lamda/(2*math.sin(theta)); #spacing between planes(angstrom)
#Result
print "deBroglie wavelength is",round(lamda,2),"angstrom"
print "spacing between planes is",round(d,2),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
e=1.6*10**-19; #charge(coulomb)
m=1.675*10**-27; #mass(kg)
E=10*10**3*e; #kinetic energy(J)
h=6.625*10**-34; #planks constant(Js)
#Calculation
v=math.sqrt(2*E/m); #velocity(m/sec)
lamda=h*10**10/(m*v); #deBroglie wavelength(angstrom)
#Result
print "deBroglie wavelength is",round(lamda,5),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
m=9.1*10**-31; #mass(kg)
h=6.63*10**-34; #planks constant(Js)
a=1; #length(m)
nx1=1;
ny1=1;
nz1=1;
nx2=1;
ny2=1;
nz2=2;
#Calculation
E1=h**2*(nx1**2+ny1**2+nz1**2)/(8*m*a**2); #energy of 1st quantum state(J)
E2=h**2*(nx2**2+ny2**2+nz2**2)/(8*m*a**2); #energy of 2nd quantum state(J)
E=E2-E1; #energy difference(J)
#Result
print "energy difference is",round(E*10**37,2),"*10**-37 J"
#importing modules
import math
from __future__ import division
#Variable declaration
m1=9.1*10**-31; #mass(kg)
m2=0.05; #mass(kg)
v=300; #velocity(m/sec)
p=0.01/100; #probability
h=6.6*10**-34; #planks constant(Js)
#Calculation
p1=m1*v; #momentum of electron(kg m/s)
deltap1=p*p1;
deltax1=h/(deltap1*4*math.pi); #uncertainity in position of electron(m)
p2=m2*v; #momentum of bullet(kg m/s)
deltap2=p*p2;
deltax2=h/(deltap2*4*math.pi); #uncertainity in position of bullet(m)
#Result
print "uncertainity in position of electron is",round(deltax1,3),"m"
print "uncertainity in position of bullet is",round(deltax2*10**31,1),"*10**-31 m"
#importing modules
import math
from __future__ import division
#Variable declaration
deltax=10**-10; #uncertainity in position(m)
L=10*10**-10; #width(m)
#Calculation
p=2*deltax/L; #probability of finding the particle
#Result
print "probability of finding the particle is",p
#importing modules
import math
from __future__ import division
#Variable declaration
e=1.6*10**-19; #charge(coulomb)
m=9.1*10**-31; #mass(kg)
E=2*10**3*e; #kinetic energy(J)
h=6.6*10**-34; #planks constant(Js)
#Calculation
p=math.sqrt(2*E*m); #momentum(kg m/s)
lamda=h/p; #deBroglie wavelength(m)
#Result
print "deBroglie wavelength is",round(lamda*10**11,2),"*10**-11 m"
#importing modules
import math
from __future__ import division
#Variable declaration
e=1.602*10**-19; #charge(coulomb)
m=1.676*10**-27; #mass(kg)
h=6.62*10**-34; #planks constant(Js)
E=0.025*e; #kinetic energy(J)
#Calculation
mv=math.sqrt(2*E*m); #velocity(m/s)
lamda=h*10**10/mv; #deBroglie wavelength(angstrom)
#Result
print "deBroglie wavelength is",round(lamda,3),"angstrom"