In [2]:

```
from math import exp
# Given
l = 5.5e-7 # wavelength of light in meter
c = 3e+8 # speed of light in m/sec
h = 6.63e-34 # Planck constant in j/sec
e = 1.6e-19 # charge on electron in coulomb
k = 8.62e-5 # Boltzmann constant in eV/K
T = 300 # temperature in kelvin
#Calculations
delta_E = (h * c) / (l * e) # calculation for energy difference
r = exp(-delta_E / (k * T)) # calculation for ratio of population of upper level to the lower energy level
T_ = (delta_E / (k * 0.693)) # calculation for temperature for the second condition
#Result
print "Ratio of population of upper level to the lower energy level = %.1e. \nTemperature for the second condition = %.f K. "%(r,T_)
#Incorrect answer in the textbook
```

In [3]:

```
from math import pi
# Given
lambda1 = 6.328e-7 # wavelength of light in first case in meter
lambda2 =2e-7 # wavelength of light in second case in meter
r1 = 2.3e-4 # the radius of internal beam of laser in first case in meter
r2 = 2.4e-3 # the radius of internal beam of laser in second case in meter
#Calculations
theta1 = lambda1 / (pi * r1) # calculation for beam divergence angle in first case
theta2 = lambda2 / (pi * r2) # calculation for beam divergence angle in second case
#Result
print "Beam divergence angle in first case = %.2e radian. \nBeam divergence angle in second case = %.2e radian. "%(theta1,theta2)
```

In [11]:

```
from math import pi,ceil
# Given
l = 6.0*10**-2 # length of laser in meter
D = 1.0*10**-2 # diameter of laser in meter
L = 6.944e-7 # wavelength of light in meter
d = 3700 # density of aluminium oxide in kg/meter cube
Na = 6e+23 # Avogadro number
M = 0.102 # molar mass of aluminium oxide in kg/meter cube
h = 4.1e-15 # Planck constant in eV-sec
c = 3e+8 # speed of light in meter/sec
#Calculations
v = (pi * (D**2) * l) / 4 # calculation for volume
N = (2 * Na * d * v) / M # calculation for no. of aluminium ions
N_ = N / 3500 # calculation for the no. of chromium ions
E = (h * c) / L # calculation for the energy of stimulated emission photon
Et = N_ * E * (1.6e-19) # calculation for total energy
#Result
print "Total energy = %.f J"%(ceil(Et))
```

In [12]:

```
from math import pi
# Given
p = 4e-3 # energy of laser pulse in meter
r = 1.5e-5 # radius of spot in meter
t = 1e-9 # pulse length in time in sec
#Calculations
p_ = p / t# calculation for power in watt
I = p_ / (pi * r**2)# calculation for power per unit area delivered by the laser
#Result
print "Power per unit area delivered by the laser = %.1e watt/square meter"%I
```

In [14]:

```
# Given
D = 5e-3 # diameter of laser in meter
l = 7.2e-7 # wavelength of light in meter
d = 4e8 # distance at moon from earth in meter
#Calculations
r = (D / 2) # calculation for radius
theta = (0.637 * l) / r # calculation for angular spread
areal_spread = (d * theta)**2 # calculation for areal spread
#Result
print "Angular spread = %.3e radian ,\nAreal spread = %.2e square meter"%(theta,areal_spread)
```

In [15]:

```
# Given
D = 5.0e-3 # diameter of laser in meter
l = 6.943e-7 # wavelength of light in meter
f =0.1 # focal length in meter
P = 0.1 # power of laser in watt
#Calculations
r = (D / 2)# calculation for
theta = (0.637 * l) / r# calculation for angular spread
areal_spread = (f * theta)**2# calculation for areal spread
I = P / areal_spread# calculation for intensity
#Result
print "Areal spread = %.3e square meter,\nIntensity = %.3e watt/square meter"%(areal_spread,I)
```

In [9]:

```
# Given
tou = 1e-10 # coherence time in sec
l = 5.4e-7 # wavelength of light in meter
#Calculations
delta_v = 1 / tou
v_ = (3e+8) / l # calculation for frequency
d = delta_v / v_ # calculation for degree of non-monochromaticity
#Result
print "Degree of non-monochromaticity = %f "%d
```