In [1]:

```
import math
#Given Data:
m=6.68*10**-27 #mass of alpha particle
V=30*10**3 #potential difference
e=1.6*10**-19 #charge of an electron
q=2*e #Charge of alpha particle
h=6.63*10**-34 #Planck's constant
#Calculations:
lamda=h/math.sqrt(2*m*q*V) #de Broglie wavelength
print"de Broglie wavelength associated with alpha particle is =" ,lamda,"m"
```

In [2]:

```
import math
#Given Data:
m=1 #mass of given particle in kg
h=6.63*10**-34 #Planck's constant
v=1*10**3 #velocity of particle
#Calculations:
lamda=h/(m*v) #de Broglie wavelength
print"de Broglie wavelength associated with particle is =",lamda,"m"
print"This wavelength is too small for any practical significance."
```

In [4]:

```
import math
#Given Data:
m1=40*10**-3 #mass of bullet in kg
m2=9.1*10**-31 #mass of electron in kg
h=6.63*10**-34 #Planck's constant
v=1100 #velocity of bullet and electron
#Calculations:
lamda1=h/(m1*v) #de Broglie wavelength
print"de Broglie wavelength associated with bullet is =",lamda1,"m"
lamda2=h/(m2*v) #de Broglie wavelength
print"de Broglie wavelength associated with electron is =",lamda2,"m"
print"Wavelength of bullet is too small.Hence it can not be measured with help of diffraction effect."
```

In [5]:

```
import math
#Given Data:
V=100 #potential difference
d=2.15*10**-10 #lattice spacing
#Calculations:
lamda=12.26*10**-10/(math.sqrt(V)) #wavelength associated with electron in meter
#using bragg's law for first order lamda=2d sin(theta)
theta=math.degrees(math.asin(lamda/(2*d))) #glancing angle in degrees
print"Glancing angle at which first reflection occurs is =",theta,"Degrees"
```

In [2]:

```
import math
#Given Data:
mn=1.674*10**-27 #mass of neutron
h=6.63*10**-34 #Planck's constant
lamda=1*10**-10 #wavelength of neutron
#Calculations:
#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength
E1=h**2/(2*mn*lamda**2) #Energy of neutron in joules
E=E1/(1.6*10**-19) #Energy of neutron in electron-Volts
print"Energy of neutron is =",E,"eV"
```

In [4]:

```
import math
#Given Data:
mn=1.67*10**-27 #mass of neutron
h=6.6*10**-34 #Planck's constant
lamda=3*10**-10 #wavelength of neutron
d=3.036*10**-10 #lattice spacing
#Calculations:
#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength
E1=h**2/(2*mn*lamda**2) #Energy of neutron in joules
E=E1/(1.6*10**-19) # Energy of neutron in electron-Volts
print"Energy of neutron is =",E,"eV"
#using bragg's law for first order lamda=2d sin(theta)
theta=math.degrees(math.asin(lamda/(2*d))) #glancing angle in degrees
print" Glancing angle at which first orde reflection occurs is =",theta,"Degrees"
```

In [5]:

```
import math
#Given Data:
m=9.108*10**-31 #mass of electron
h=6.625*10**-34 #Planck's constant
lamda=5*10**-7 #wavelength of electron
#Calculations:
#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength
E1=h**2/(2*m*lamda**2) #Energy of electron in joules
E=E1/(1.6*10**-19) #Energy of electron in electron-Volts
print"Energy of electron is =",E,"eV"
```

In [7]:

```
import math
#Given Data:
mn=1.676*10**-27 #mass of neutron
me=9.1*10**-31 #mass of electron
h=6.625*10**-34 #Planck's constant
#Calculations:
#Part 1:
En1=0.025 #Energy in eV of neutron
En=En1*(1.6*10**-19) #Energy in joules
lamda1=h/math.sqrt(2*mn*En) #wavelength of a beam of neutron
print"wavelength of a beam of neutron is =",lamda1,"m"
#Part 2:
lamda2=2*10**-10 #wavelength of electron and photon
#//we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength
Ee1=h**2/(2*me*lamda2**2) #Energy of electron in joules
Ee=Ee1/(1.6*10**-19) #Energy of electron in electron-Volts
print"Energy of electron is =",Ee,"eV"
p1=h/lamda2 #momentum of electron
print" Momentum of electron is =",p1,"kg.m/s"
C=3*10**8 #Velocity of light
Ep=h*C/lamda2 #Energy of photon in joules
print"Energy of photon is =",Ep,"Joules"
p2=h/lamda2 #momentum of photon
print"Momentum of photon is =",p2,"kg.m/s"
```

In [9]:

```
import math
#Given data:
#We have alpha particle,neutron,proton and electron.
#To find: shortest wavelength
print"We know, lamda=h/sqrt(2*m*E) #de Broglie wavelength"
#Wavelength is inversely proportional to mass of particle for constant energy
print"i.e., Wavelength is inversely proportional to mass of particle for constant energy. "
print"We have alpha particle,neutron,proton and electron."
#AS,alpha particle has highest mass.Thus it will have shortest wavelength.
print"Out of above, alpha particle has highest mass."
print"Hence it will have shortest wavelength."
```

In [10]:

```
import math
#Given Data:
me=9.108*10**-31 # mass of electron
mp=1.66*10**-27 # bmass of proton
h=6.625*10**-34 # Planck's constant
lamda=1*10**-10 # wavelength of electron and proton
#Calculations:
#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength
Ee1=h**2/(2*me*lamda**2) #Energy of electron in joules
Ee=Ee1/(1.6*10**-19) #Energy of electron in electron-Volts
print"Energy of electron is =",Ee,"eV"
Ep1=h**2/(2*mp*lamda**2) #Energy of photon in joules
Ep=Ep1/(1.6*10**-19) #Energy of photon in electron-Volts
print"Energy of photon is =",Ep,"eV"
```

In [13]:

```
import math
#Given Data:
m1=50*10**-9 #mass of particle in kg
m2=9.1*10**-31 #mass of electron in kg
h=6.625*10**-34 #Planck's constant
v1=1 #velocity of particle
v2=3*10**6 #velocity of electron
#Calculations:
lamda1=h/(m1*v1)*10**10 #de Broglie wavelength
print"de Broglie wavelength associated with particle is =",lamda1,"Angstrom"
lamda2=h/(m2*v2)*10**10 #de Broglie wavelength
print"de Broglie wavelength associated with electron is =",lamda2,"Angstrom"
print"Wavelength of electron is measurable."
```

In [1]:

```
import math
#Given Data:
me=9.1*10**-31 #mass of electron in kg
h=6.63*10**-34 #Planck's constant
#Calculations:
E1=2*10**3 #Energy in eV of electron
E=E1*(1.6*10**-19) #Energy in joules
lamda=h/math.sqrt(2*me*E) #wavelength of electron
print"Wavelength of electron is =",lamda,"m"
```

In [2]:

```
import math
#Given Data:
me=9.1*10**-31 #mass of electron
h=6.63*10**-34 #Planck's constant
lamda=2*10**-10 #wavelength of electron and photon
#Calculations:
p1=h/lamda #momentum of electron
print"Momentum of electron is =",p1,"kg.m/s"
Ee=p1**2/(2*me) #Energy of electron in joules
print"Energy of electron is =",Ee,"Joules"
p2=h/lamda #momentum of photon
print"Momentum of photon is =",p2,"kg.m/s"
c=3*10**8 #Velocity of light
Ep=h*c/lamda #Energy of photon in joules
print"Energy of photon is =",Ep,"Joules"
```

In [3]:

```
import math
#Given Data:
m=1.676*10**-27 #mass of neutron
h=6.625*10**-34 #Planck's constant
lamda=1*10**-10 #wavelength of neutron
#Calculations:
C=3*10**8 #Velocity of light
Ep1=h*C/lamda #Energy of photon in joules
E1=Ep1/(1.6*10**-19) #Energy of photon in electron-Volts
print"Energy of photon is =",E1,"eV"
#we know, lamda=h/sqrt(2*m*E) #de Broglie wavelength
En1=h**2/(2*m*lamda**2) #Energy of neutron in joules
E2=En1/(1.6*10**-19) #Energy of neutron in electron-Volts
print"Energy of neutron is =",E2,"eV"
R=E1/E2 #Ratio of energies of proton to neutron
print"Ratio of energies of proton to neutron is =",R
```

In [4]:

```
import math
#Given Data:
v=900 #velocity of electron in m/s
delv=v*0.001/100 #uncertainity in velocity
h=6.63*10**-34 #Planck's constant
m=9.1*10**-31 #mass of an electron
#Calculations:
delp=m*delv #uncertainity in the measured values of momentum
#using heisenberg's uncertainity formula
delx=h/(2*3.142*delp) #uncertainity in its position
print"Uncertainity with which position of electron can be located is >=",delx,"m"
```

In [6]:

```
import math
#Given Data:
m=1.6*10**-27 #mass of proton in kg
h=6.63*10**-34 #Planck's constant
v=3./20*10**8 #velocity of particle
#Calculations:
lamda=h/(m*v) #de Broglie wavelength
print"de Broglie wavelength associated with proton is =",lamda,"m"
```

In [8]:

```
import math
#Given Data:
m=1.676*10**-27 #mass of neutron
h=6.634*10**-34 #Planck's constant
#Calculations:
E1=0.025 #Energy in eV of neutron
E=E1*(1.6*10**-19) #Energy in joules
#As E=m*v**2/2
v=math.sqrt(2*E/m) #Velocity of neutron beam
lamda=h/(m*v) #wavelength of a beam of neutron
print"wavelength of a beam of neutron is =",lamda,"m"
```

In [9]:

```
import math
#Given Data:
delx=10*10**-9 #uncertainity in position of electron
h=6.63*10**-34 #Planck's constant
m=9.1*10**-31 #mass of an electron
E=10**3*1.6*10**-19 #Energy of electron in joules
#Calculations:
p=math.sqrt(2*m*E) #momentum of electron
#using heisenberg's uncertainity formula
delp=h/(2*math.pi*delx) #uncertainity in the momentum
P=delp/p*100 #percentage of uncertainity in momentum
print"Percentage of uncertainity in momentum of electron is =",P,"percent"
```

In [11]:

```
import math
#Given Data:
m=1.676*10**-27 #mass of neutron
h=6.63*10**-34 #Planck's constant
lamda=2*10**-12 #wavelength of neutron
c=3*10**8 #Velocity of light
#Calculations:
p=h/lamda #momentum of neutron
KE=p**2/(2*m) #Kinetic Energy of neutron in joules
print"Kinetic Energy of electron is =",KE,"Joules"
#velocity of particle is same as group velocity. Thus,
vg=p/m #group velocity
print"group velocity of neutron is =",vg,"m/s"
#using, vg*vp=c**2
vp=c**2/vg #phase velocity
print" phase velocity of neutron is =",vp,"m/s"
```

In [12]:

```
import math
#Given Data:
m=1.157*10**-30 #mass of particle in kg
h=6.63*10**-34 #Planck's constant
c=3*10**8 #Velocity of light
#Calculations:
E1=80 #Energy in eV of particle
E=E1*(1.6*10**-19) #Energy in joules
lamda=h/math.sqrt(2*m*E) #wavelength of particle
print"Wavelength of particle is =",lamda,"m"
#Now,
vg=h/(lamda*m) #group velocity
print"Group velocity of particle is =",vg,"m/s"
#using, vg*vp=c**2
vp=c**2/vg #phase velocity
print"Phase velocity of particle is =",vp,"m/s"
```

In [3]:

```
import math
#Given Data:
v=400 #velocity of electron in m/s
delv=0.01/100 #uncertainity in velocity
h=6.63*10**-34 #Planck's constant
m=9.11*10**-31 #mass of an electron
#Calculations:
p=m*v #momentum of an electron
delp=p*delv #uncertainity in the measured values of momentum
#using heisenberg's uncertainity formula
delx=h/(2*math.pi*delp) #accuracy in its position
print"Accuracy in its position is >=",delx,"m"
```

In [4]:

```
import math
#Given Data:
delx=10**-8 #maximum uncertainity in position of electron
h=6.63*10**-34 #Planck's constant
m=9.1*10**-31 #mass of an electron
#Calculations:
#using heisenberg's uncertainity formula
delp=h/(2*math.pi*delx) #minimum uncertainity in the measured values of momentum
delv=delp/m #minimum uncertainity in the velocity of an electron
print"Minimum uncertainity in the velocity of an electron is =",delv,"m/s"
```

In [5]:

```
import math
#Given Data:
delv=2*10**4 #uncertainity in velocity
h=6.63*10**-34 #Planck's constant
m=9.1*10**-31 #mass of an electron
#Calculations:
delp=m*delv #uncertainity in the measured values of momentum
#using heisenberg's uncertainity formula
delx=h/(2*math.pi*delp) #accuracy in its position
print"Minimum space required by electron to be confined in an atom is >=",delx,"m"
```

In [6]:

```
import math
#Given Data:
delt=1.4*10**-10 #uncertainity in time spent by nucleus in excited state
h=6.63*10**-34 #Planck's constant
#Calculations:
#using, delE*delt>= h/(2*math.pi)
delE1= h/(2*math.pi*delt) #uncertaininty in its energy in excited state in joules
delE=delE1/(1.6*10**-19) #uncertaininty in its energy in excited state in eV
print"Uncertaininty in its energy in excited state is >=",delE,"eV"
```

In [8]:

```
import math
#Given Data:
a=2*10**-10 #width of potential well in m
h=6.63*10**-34 #Planck's constant
m=9.1*10**-31 #mass of an electron
#Calculations:
#we know equation for energy of an electron
n0=1
E01=n0**2*h**2/(8*m*a**2) #Energy in ground state
E0=E01/(1.6*10**-19) #Energy in eV
print"Energy of an electron in ground state is=",E0,"eV"
n1=2
E11=n1**2*h**2/(8*m*a**2) #Energy in first excited state
E1=E11/(1.6*10**-19) #Energy in eV
print" Energy of an electron in first excited state is=",E1,"eV"
n2=3
E21=n2**2*h**2/(8*m*a**2) #Energy in second excited state
E2=E21/(1.6*10**-19) #Energy in eV
print"Energy of an electron in second excited state is=",E2,"eV"
```

In [9]:

```
import math
#Given Data:
a=25*10**-10 #width of well
delx=5*10**-10 #uncertainity in position of particle
n=1 #ground state
#calculation:
x1=a/2
psi1=math.sqrt(2/a)*math.sin(n*math.pi/a*x1)
P1=(psi1**2)*delx #Probability of finding particle at distance of x1
print"Probability of finding particle at a distance of x1 is =",P1
x2=a/3
psi2=math.sqrt(2/a)*math.sin(n*math.pi/a*x2)
P2=(psi2**2)*delx #Probability of finding particle at distance of x2
print"Probability of finding particle at a distance of x2 is =",P2
print"(There is print mistake in book)."
x3=a
psi3=math.sqrt(2/a)*math.sin(n*math.pi/a*x3)
P3=(psi3**2)*delx #Probability of finding particle at distance of x3
print"Probability of finding particle at a distance of x3 is =",P3
```

In [ ]:

```
```