#importing modules
import math
from __future__ import division
#Variable declaration
c=3*10**8; #velocity of light(m/sec)
lamda=6943*10**-10; #wavelength(m)
h=6.626*10**-34; #planck's constant(Jsec)
Kb=1.38*10**-23; #boltzmann constant
T=300; #temperature(K)
#Calculation
new=c/lamda; #frequency(Hz)
a=h*new/(Kb*T);
N1byN2=math.exp(a); #relative population
#Result
print "relative population is",round(N1byN2/10**30,3),"*10**30"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
c=3*10**8; #velocity of light(m/sec)
lamda=632.8*10**-9; #wavelength(m)
h=6.626*10**-34; #planck's constant(Jsec)
t=1; #time(sec)
P=2.3*10**-3; #power(W)
sa=1*10**-6; #spot area(m**2)
#Calculation
new=c/lamda; #frequency(Hz)
n=P*t/(h*new); #number of photons emitted(per sec)
Pd=P/sa; #power density(kW/m**2)
#Result
print "number of photons emitted is",round(n/10**15,2),"*10**15 photons/second"
print "power density is",Pd/10**3,"kW/m**2"
#importing modules
import math
from __future__ import division
#Variable declaration
c=3*10**8; #velocity of light(m/sec)
e=1.6*10**-19; #charge of electron(coulomb)
Eg=1.44*e; #band gap energy(J)
h=6.626*10**-34; #planck's constant(Jsec)
#Calculation
lamda=h*c/Eg; #wavelength(m)
#Result
print "wavelength is",int(round(lamda*10**10)),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=1.55; #peak emission wavelength(micro m)
#Calculation
Eg=1.24/lamda; #band gap(eV)
#Result
print "band gap is",Eg,"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
c=3*10**8; #velocity of light(m/sec)
e=1.6*10**-19; #charge of electron(coulomb)
lamda=6943*10**-10; #wavelength(m)
h=6.6*10**-34; #planck's constant(Jsec)
kb=1.38*10**-23; #boltzmann constant
T=300; #temperature(K)
#Calculation
Uv=h*c/(e*lamda); #energy(eV)
Uvj=Uv*e; #energy(J)
x=Uvj/(kb*T);
NbyN0=math.exp(x); #relative population of 2 states
#Result
print "relative population of 2 states is",int(NbyN0*10**-29),"*10**29"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
c=2.998*10**8; #velocity of light(m/sec)
lamda=0.5*10**-9; #wavelength(m)
h=6.626*10**-34; #planck's constant(Jsec)
Kb=1.381*10**-23; #boltzmann constant
T=1000; #temperature(K)
#Calculation
new=c/lamda; #operating frequency(Hz)
new=new/10**3; #operating frequency(kHz)
new=round(new/10**14)*10**14;
x=h*new/(Kb*T);
B21byA21=1/(math.exp(x)-1); #ratio of emission
#Result
print "ratio of emission is",round(B21byA21*10**13,1),"*10**-13"