Chapter 6: Classification of solids

Example 6.1, page no-143

In [1]:
# Wavelength of light emitted from LED

import math
#variable declaration
e=1.609*10**-19             # charge of an electron
eg=1.8                      # energy band gap
h=6.626*10**-34             # Planck's constant
c=3*10**8                   # speed of light


#calculation
E=e*eg
lamda=h*c/E

#Result
print('The wavelength of light emitted from given LED is %.3f µm'%(lamda*10**7))
The wavelength of light emitted from given LED is 6.863 µm

Example 6.2, page no-144

In [5]:
#Band gap of given GaAsP

import math
#variable declaration
lam=6715*10**-10          # wavelength of greenlight from mercury lamp
h=6.626*10**-34           # planck's constant
c=3*10**8                 # speed of light
e=1.6*10**-19             # charge of an electron

#calculation
Eg=h*c/lam
Eg=Eg/e

#Result
print('The band gap of the given GaAsP is %.1f eV'%(math.floor(Eg*10)/10))
The band gap of the given GaAsP is 1.8 eV