import math;
# Variable Declaration
lamda = 3*10**-10; # wavelength of incident photons in m
theta = 60; # viewing angle in degrees
h = 6.625*10**-34 # plancks constant
mo = 9.11*10**-31 # mass in Kg
c = 3*10**8; # vel. of light
# Calculatioms
# from Compton theory ,Compton shift is given by
# lamda' - lamda = (h/(mo*c))*(1-cosθ)
theta_r = theta*math.pi/180; # degree to radian conversion
lamda1 = lamda+( (h/(mo*c))*(1-math.cos(theta_r))) # wavelength of scattered photons
# Result
print 'Wavelength of Scattered photons = %3.4f'%(lamda1*10**10),'Å';
import math;
# Variable declaration
theta = 135; # angle in degrees
h = 6.625*10**-34 # plancks constant
mo = 9.1*10**-31 # mass in Kg
c = 3*10**8; # vel. of light in m/s
# Calculatioms
# from Compton theory ,Compton shift is given by
# lamda' - lamda = (h/(mo*c))*(1-cosθ)
theta_r = theta*math.pi/180; # degree to radian conversion
c_lamda = ( (h/(mo*c))*(1-math.cos(theta_r))) # Change in wavelength in m
# Result
print 'Change in Wavelength = %3.5f' %(c_lamda*10**10),' Å';
import math;
# Variable Declaration
lamda = 0.1*10**-9; # wavelength of X-rays in m
theta = 90; # angle with incident beam in degrees
h = 6.625*10**-34 # plancks constant
mo = 9.11*10**-31 # mass in Kg
c = 3*10**8; # vel. of light
# Calculatioms
# from Compton theory ,Compton shift is given by
# lamda' - lamda = (h/(mo*c))*(1-cosθ)
theta_r = theta*math.pi/180; # degree to radian conversion
lamda1 = lamda+( (h/(mo*c))*(1-math.cos(theta_r))) #wavelength of scattered beam
# Result
print 'Wavelength of Scattered beam = %3.4f' %(lamda1*10**10),' Å';
import math;
# Variable Declaration
h = 6.625*10**-34 # plancks constant
m = 9.11*10**-31 # mass of electron in Kg
e = 1.6*10**-19 # charge of electron
V = 150; # potential difference in volts
# Calculations
lamda = h/(math.sqrt(2*m*e*V)) # de Broglie wavelength
#Result
print 'The de-Broglie wavelength = %d' %(lamda*10**10), 'Å';
import math;
# Variable Declaration
h = 6.625*10**-34 # plancks constant
m = 9.11*10**-31 # mass of electron in Kg
e = 1.6*10**-19 # charge of electron
V = 5000; # potential in volts
# Calculations
lamda = h/(math.sqrt(2*m*e*V)) #de Broglie wavelength
# Result
print 'The de-Broglie wavelength of electron = %3.5f' %(lamda*10**10),' Å';
import math;
# Variable Declaration
E = 100 # Energy of electron in eV
h = 6.625*10**-34 # plancks constant
m = 9.11*10**-31 # mass of electron in Kg
e = 1.6*10**-19 # Charge of electron in Columbs
# Calculations
E1 = E*e # Energy conversion from eV to Joule
lamda = h/(math.sqrt(2*m*E1)) # de Broglie wavelength
# Result
print 'The de-Broglie wavelength = %3.3f' %(lamda*10**10),' Å';
import math;
# Variable Declaration
m = 1.675*10**-27; # Mass of proton in kg
c = 3*10**8; # velocity of light in m/s
h = 6.625*10**-34 # plancks constant
# Calculations
vp = c/20; # velocity of proton in m/s
lamda = h/(m*vp) # de-Broglie wavelength in m
# Result
print 'de-Broglie wavelength = %e'%(lamda),'lamda';
import math;
# Variable declaration
E = 10000 # Energy of neutron in eV
h = 6.625*10**-34 # plancks constant
m = 1.675*10**-27 # mass of neutron in Kg
e = 1.6*10**-19
# Calculations
E1 = E*e # Energy conversion from eV to Joule
lamda = h/(math.sqrt(2*m*E1)) # de Broglie wavelength
# Result
print 'The de-Broglie wavelength of neutron = %3.3e' %lamda,' m';
import math;
# Variable decalaration
l = 0.1*10**-9; # side of cubical box
h = 6.625*10**-34 # plancks constant in Jsec
m = 9.11*10**-31 # mass of electron in Kg
Kb = 1.38*10**-23 # Boltzmann constant
# Calculations
# for cubical box the energy eigen value is Enx ny nz = (h^2/(8*m*l^2))*(nx^2 + ny^2 +nz^2)
# For the next energy level to the lowest energy level nx = 1 , ny = 1 and nz = 2
nx = 1
ny = 1
nz = 2
E112 = (h**2/(8*m*l**2))*( nx**2 + ny**2 + nz**2);
# We know the average energy of molecules of aperfect gas = (3/2)*(Kb*T)
T = (2*E112)/(3*Kb); # Temperature in kelvin
# Result
print 'E112 = %3.4e' %E112,'Joules'',\n','Temperature of the molecules T = %3.4e' %T, 'K';
import math;
# Variable declaration
l = 4*10**-9; # width of infinitely deep potential
h = 6.625*10**-34 # plancks constant in Jsec
m = 9.11*10**-31 # mass of electron in Kg
n = 1; # minimum energy
e = 1.6*10**-19 # charge of electron in columbs
# Calculations
E = (h**2 * n**2)/(8*m*l**2) # Energy of electron in an infinitely deep potential well
E1 = E/e #energy conversion from joules to eV
# Result
print 'Minimum energy of an electron = %3.4f' %E1,' eV';
import math;
# Variable Declaration
l = 0.1*10**-9; # length of one dimensional box
h = 6.625*10**-34 # plancks constant in Jsec
m = 9.11*10**-31 # mass of electron in Kg
n = 1; # for ground state
n5 = 6; # n value for fifth excited state
e = 1.6*10**-19 # charge of electron in columbs
# Calculations
Eg = (h**2 * n**2)/(8*m*l**2 * e ) # Energy in ground state in eV
Ee = (h**2 * n5**2)/(8*m*l**2 * e) # Energy in excited state in eV
E = Ee - Eg; # energy req to excite electrons from ground state to fifth excited state
# Result
print 'Energy required to excite an electron from ground state to fifth excited state = %3.2f' %E, 'eV';
import math;
# Variable decalration
l = 0.1*10**-9; # length of one dimensional box
h = 6.625*10**-34 # plancks constant in Jsec
m = 9.11*10**-31 # mass of electron in Kg
n = 1; # for ground state
e = 1.6*10**-19 # charge of electron in columbs
# Calculations
E = (h**2 * n**2)/(8*m*l**2 *e ) # Energy of electron in eV
# Result
print 'Energy of an electron = %3.3f' %E,' eV';
import math;
# Variable declaration
l = 0.5*10**-9; # width of one dimensional box in m
h = 6.625*10**-34 # plancks constant in Jsec
m = 9.11*10**-31 # mass of electron in Kg
n = 1; # for ground state
e = 1.6*10**-19 # charge of electron in columbs
# Calculations
E = (h**2 * n**2)/(8*m*l**2 *e ) # Energy of electron in eV
# Result
print 'Least Energy of an electron = %3.4f' %E,' eV';
import math;
# variable declaration
h = 6.625*10**-34 # plancks constant
c = 3*10**8; # vel. of light
lamda = 5893*10**-10; # wavelength in m
P = 100 # power of sodium vapour lamp
# Calculations
E = (h*c)/lamda; # Energy in joules
N = P/E # Number of photons emitted
# Result
print 'Number of Photons emitted = %3.4e' %N,' per second';
import math;
# Variable declaration
lamda1 = 0.022*10**-10; # wavelength of scatterd X-rays in m
theta = 45; # scatterring angle in degrees
h = 6.625*10**-34 # plancks constant
mo = 9.11*10**-31 # mass in Kg
c = 3*10**8; # vel. of light
# Calculatioms
# from Compton theory ,Compton shift is given by
# lamda' - lamda = (h/(mo*c))*(1-cosθ)
theta_r = theta*math.pi/180; # degree to radian conversion
lamda = lamda1-( (h/(mo*c))*(1-math.cos(theta_r))) # incident Wavelength
# Result
print 'Wavelength of incident beam = %3.4f' %(lamda*10**10),' Å';
import math;
# Variable Declaration
Ei = 1.02*10**6 # photon energy in eV
theta = 90; # scattered angle in degrees
h = 6.625*10**-34 # plancks constant
mo = 9.1*10**-31 # mass of electron in Kg
e = 1.6*10**-19 # charge of electron
c = 3*10**8; # vel. of light in m/s
# Calculations
# from Compton theory ,Compton shift is given by
# lamda' - lamda = (h/(mo*c))*(1-cosθ)
theta_r = theta*math.pi/180; # degree to radian conversion
c_lamda = ( (h/(mo*c))*(1-math.cos(theta_r))) #Change in wavelength in m
dv = c/c_lamda; # change in frequency of the scattered photon
dE = (h*dv)/e # change in energy of scattered photon in eV
# This change in energy is transferred as the KE of the recoil electron
Er = dE; # Energy of recoil electron
Es = Ei - Er # Energy of scattered photon
# Result
print 'Energy of the recoil electron = %3.4f' %(Er*10**-6),' MeV','\n','Energy of the Scattered photon = %3.4f' %(Es*10**-6),'MeV';
import math;
# Variable Declaration
lamda = 0.124*10**-10; # wavelength of X-rays in m
theta = 180; # Scattering angle in degrees
h = 6.625*10**-34 # plancks constant
mo = 9.11*10**-31 # mass in Kg
c = 3*10**8; # vel. of light
# Calculatioms
# from Compton theory ,Compton shift is given by
# lamda' - lamda = (h/(mo*c))*(1-cosθ)
theta_r = theta*math.pi/180; # degree to radian conversion
lamda1 = lamda+( (h/(mo*c))*(1-math.cos(theta_r))) # wavelength of scattered X-rays
# Result
print 'Wavelength of Scattered X-rays = %3.4f' %(lamda1*10**10),' Å';
import math;
# Variable Declaration
h = 6.625*10**-34 # plancks constant
m = 9.11*10**-31 # mass of electron in Kg
e = 1.6*10**-19 # charge of electron
V = 2000; # potential in volts
# Calculations
lamda = h/(math.sqrt(2*m*e*V)) # de Broglie wavelength
# Result
print 'The de-Broglie wavelength of electron = %3.4f' %(lamda*10**10),' Å';
import math;
# variable Declaration
h = 6.625*10**-34 # plancks constant
m = 1.678*10**-27 # mass of proton in Kg
e = 1.6*10**-19 # charge of electron
Kb = 1.38*10**-23; # boltzmann constant
T = 300 # Temperature in kelvin
#Calculations
lamda = h/(math.sqrt(3*m*Kb*T)) #de Broglie wavelength
#Result
print 'The de-Broglie wavelength = %3.4f' %(lamda*10**10),' Å';
import math;
# Variable Declaration
h = 6.625*10**-34 # plancks constant
m = 9.11*10**-31 # mass of electron in Kg
lamda = 3*10**-2; # wavelength of electron wave
e = 1.6*10**-19; # charge of electron
# Calculations
E = (h**2)/(2*m*lamda**2); # Energy in Joules
E1 = E/e;
# Result
print 'Energy of the electron E = %3.4e' %E1,'eV';
print 'Note: Calculation mistake in textbook'
import math;
# Variable declaration
h = 6.625*10**-34 # plancks constant
m = 9.11*10**-31 # mass of electron in Kg
c = 3*10**8; # velocity of light in m/s
# Calculations
ve = 0.7071*c # velocity of electron
lamda = h/(m*ve*math.sqrt(1-(ve/c)**2)) #de Broglie wavelength
# we know Compton wavelength ,lamda' - lamda = (h/(mo*c))*(1-cosθ)
# maximum shift θ = 180
theta = 180
theta1 = theta*math.pi/180;
d_lamda = (h/(m*c))*(1-math.cos(theta1))
print 'de Broglie wavelength = %e' %lamda,' m';
print 'compton wavelength = %e' %d_lamda,'m';
print 'The de-Broglie wacelength is equal to the compton wavelength';
import math;
# Variable Declaration
l = 10**-10; # side of one dimensional box
h = 6.625*10**-34 # plancks constant in Jsec
m = 9.11*10**-31 # mass of electron in Kg
n1 = 1; # for 1st eigen value
n2 = 2; # for 2nd eigen value
n3 = 3; # for 3rd eigen value
n4 = 4; # for 4th eigen value
e = 1.6*10**-19 # charge of electron in columbs
# Calculations
E1 = (h**2 * n1**2)/(8*m*l**2 *e ) #first Eigen value
E2 = (h**2 * n2**2)/(8*m*l**2 *e ) # second Eigen value
E3 = (h**2 * n3**2)/(8*m*l**2 *e ) # third Eigen value
E4 = (h**2 * n4**2)/(8*m*l**2 *e ) # fourth Eigen value
# Result
print '1st Eigen value = %3.1f' %E1,'eV';
print '2nd Eigen value = %3.1f' %E2,'eV';
print '3rd Eigen value = %3.1f' %E3,'eV';
print '4th Eigen value = %3.1f' %E4,'eV';
import math;
# Variable Declaration
l = 10**-10 ; # length of one dimensional box in m
h = 6.625*10**-34 # plancks constant in Jsec
m = 9.11*10**-31 # mass of electron in Kg
n = 1; # for ground state
e = 1.6*10**-19 # charge of electron in columbs
# Calculations
E = 2*(h**2 * n**2)/(8*m*l**2 *e ) #Energy of system having two electrons
# Result
print 'Energy of the system having two electrons = %3.4f' %E,' eV';
import math;
# Variable Declaration
b = 40; # angle subtended by final images at eye in degrees
a = 10 # angle subtended by the object at the eye kept at near point in degrees
# Calculations
b_r = b*math.pi/180; # degree to radian conversion
a_r = a*math.pi/180; # degree to radian conversion
M = math.tan(b_r)/math.tan(a_r); # magnifying power
#Result
print 'Magnifying power = %3.3f' %M;