1: Atomic Spectra

Example number 1, Page number 55

In [2]:
#importing modules
import math
from __future__ import division

#Variable declaration    
n1=3;
n2=5;        #states
RH=1.0977*10**7;

#Calculations
newbar=RH*((1/n1**2)-(1/n2**2));
lamda=10**6/newbar;         #wavelength of emitted photon(angstrom)

#Result
print "wavelength of emitted photon is",round(lamda,3),"angstrom"
wavelength of emitted photon is 1.281 angstrom

Example number 2, Page number 56

In [8]:
#importing modules
import math
from __future__ import division

#Variable declaration    
E1=1.21;
E2=1.96;        #energy of two orbits(eV)

#Calculations
n1=math.sqrt(E2);
n2=math.sqrt(E1);       #ratio of principal quantum number of two orbits
n1=n1*10;
n2=n2*10;               #multiply and divide the ratio by 10

#Result
print "ratio of principal quantum number of two orbits is",int(n1),"/",int(n2)
ratio of principal quantum number of two orbits is 14 / 11

Example number 3, Page number 56

In [11]:
#importing modules
import math
from __future__ import division

#Variable declaration    
e=1.6*10**-19;            #charge(coulomb)
mp=1.672*10**-27;         #mass of electron(kg)
h=6.62*10**-34;           #planks constant(Js)

#Calculations
mewp=e*h/(4*math.pi*mp);  #magnetic moment of proton(Am**2) 

#Result
print "magnetic moment of proton is",round(mewp*10**27,3),"*10**-27 Am**2"
print "answer in the book varies due to rounding off errors"
magnetic moment of proton is 5.041 *10**-27 Am**2
answer in the book varies due to rounding off errors

Example number 4, Page number 56

In [13]:
#importing modules
import math
from __future__ import division

#Variable declaration    
mewB=9.274*10**-24;       #bohr magneton(amp m**2)
h=6.62*10**-34;           #planks constant(Js)

#Calculations
ebym=mewB*4*math.pi/h;    #specific charge of electron(coulomb/kg)      

#Result
print "specific charge of electron is",round(ebym/10**11,4),"*10**11 coulomb/kg"
print "answer in the book varies due to rounding off errors"
specific charge of electron is 1.7604 *10**11 coulomb/kg
answer in the book varies due to rounding off errors

Example number 5, Page number 57

In [17]:
#importing modules
import math
from __future__ import division

#Variable declaration    
e=1.6*10**-19;      #charge(coulomb)
B=1;                #flux density(Wb/m**2)
lamda=6000*10**-10; #wavelength(m)
m=9.1*10**-31;      #mass(kg)
c=3*10**8;          #velocity of light(m/sec)

#Calculations
d_lamda=B*e*(lamda**2)/(4*math.pi*m*c);     #wavelength separation(m)
d_lamda=2*d_lamda*10**10;                   #wavelength separation(angstrom)

#Result
print "wavelength separation is",round(d_lamda,4),"angstrom"
print "answer in the book varies due to rounding off errors"
wavelength separation is 0.3358 angstrom
answer in the book varies due to rounding off errors

Example number 6, Page number 57

In [19]:
#importing modules
import math
from __future__ import division

#Variable declaration    
n1=1;
n2=2;        #states

#Calculations
E1=-13.6/n1**2;     #energy of electron in 1st orbit(eV)
E2=-13.6/n2**2;     #energy of electron in 2nd orbit(eV)

#Result
print "energy of electron in 1st and 2nd orbit is",E1,"eV and",E2,"eV"
energy of electron in 1st and 2nd orbit is -13.6 eV and -3.4 eV

Example number 8, Page number 58

In [21]:
#importing modules
import math
from __future__ import division

#Variable declaration    
lamda=0.5*10**-10;        #radius of 1st orbit(m)
h=6.62*10**-34;           #planks constant(Js)

#Calculations
L=h/(2*math.pi*lamda);    #linear momentum(kg ms-1)

#Result
print "linear momentum is",round(L*10**24,3),"*10**-24 kg ms-1"
linear momentum is 2.107 *10**-24 kg ms-1

Example number 9, Page number 58

In [26]:
#importing modules
import math
from __future__ import division

#Variable declaration   
E1=-13.6;     #energy of electron in 1st orbit(eV)
E2=-12.75;    #energy of electron in 2nd orbit(eV)

#Calculations
n=math.sqrt(-E1/(E2-E1));    #state to which it is excited

#Result
print "state to which it is excited is",int(n)
state to which it is excited is 4

Example number 10, Page number 59

In [28]:
#importing modules
import math
from __future__ import division

#Variable declaration    
e=1.6*10**-19;          #charge(coulomb)
m=9.1*10**-31;          #mass of electron(kg)
h=6.62*10**-34;         #planks constant(Js)

#Calculations
mewB=e*h/(4*math.pi*m);  #bohr magneton(coulomb Js kg-1) 

#Result
print "bohr magneton is",round(mewB*10**24,3),"*10**-24 coulomb Js kg-1"
print "answer in the book varies due to rounding off errors"
bohr magneton is 9.262 *10**-24 coulomb Js kg-1
answer in the book varies due to rounding off errors

Example number 11, Page number 59

In [30]:
#importing modules
import math
from __future__ import division

#Variable declaration    
e=1.6*10**-19;          #charge(coulomb)
m=9.1*10**-31;          #mass of electron(kg)
B=0.02;                 #magnetic field(T)

#Calculations
delta_new=e*B/(4*math.pi*m);    #component separation(Hz)

#Result
print "component separation is",round(delta_new/10**8,4),"*10**8 Hz"
print "answer in the book varies due to rounding off errors"
component separation is 2.7983 *10**8 Hz
answer in the book varies due to rounding off errors

Example number 14, Page number 61

In [33]:
#importing modules
import math
from __future__ import division

#Variable declaration    
e=1.6*10**-19;          #charge(coulomb)
m=9.1*10**-31;          #mass of electron(kg)
lamda=10000*10**-10;    #wavelength(m)
c=3*10**8;              #velocity of light(m/sec)
d_lamda=1*10**-10;      #wavelength separation(m)

#Calculations
B=d_lamda*4*math.pi*m*c/(e*lamda**2);      #magnetic flux density(Tesla)

#Result
print "magnetic flux density is",round(B,2),"Tesla"
magnetic flux density is 2.14 Tesla

Example number 19, Page number 66

In [41]:
#importing modules
import math
from __future__ import division

#Variable declaration    
e=1.6*10**-19;          #charge(coulomb)
m=9.1*10**-31;          #mass of electron(kg)
lamda=4226;             #wavelength(angstrom)
c=3*10**8;              #velocity of light(m/sec)
B=4;                    #magnetic field(Wb/m**2)

#Calculations
dnew=B*e/(4*math.pi*m);    
dlamda=lamda**2*dnew*10**-10/c;      #separation(angstrom)
dlamda1=lamda+dlamda;
dlamda2=dlamda1+dlamda;    #wavelength of three components(Hz)

#Result
print "separation is",round(dlamda,2),"angstrom"
print "wavelength of three components is",lamda,"angstrom",round(dlamda1,2),"angstrom",round(dlamda2,3),"angstrom"
separation is 0.33 angstrom
wavelength of three components is 4226 angstrom 4226.33 angstrom 4226.666 angstrom

Example number 21, Page number 68

In [42]:
#importing modules
import math
from __future__ import division

#Variable declaration    
n1=1;
n2=2;        
n3=3;
n4=4;
n5=5;

#Calculations
e1=2*n1**2;     #maximum number of electrons in 1st orbit
e2=2*n2**2;     #maximum number of electrons in 2nd orbit
e3=2*n3**2;     #maximum number of electrons in 3rd orbit
e4=2*n4**2;     #maximum number of electrons in 4th orbit
e5=2*n5**2;     #maximum number of electrons in 5th orbit
e=e1+e2+e3+e4+e5;      #number of elements

#Result
print "number of elements would be",e
number of elements would be 110