import math
#Variable declaration
lamda = 6943.*10**-10 #wavelength(m)
T = 300. #temperature(K)
h = 6.626*10**-34 #Planck's constant
c = 3*10**8 #velocity of light(m/s)
K = 8.61*10**-5
#Calculations
E2_E1 = (h*c)/(lamda*1.6*10**-19) #in eV
N2_N1 = math.exp(-E2_E1/(K*T))
#Result
print "The relative population of two states in a ruby laser is",round((N2_N1/1E-31),2)
#Variable declaration
a1 = 4. #diameter of laser beam for distance first(m)
a2 = 6. # diameter of laser beam from second distance(m)
d1 = 1. #First distance from laser to output beam spot(m)
d2 = 2. #Second distance from laser to output beam spot(m)
#Calculation
D = (a2-a1)/(2*(d2-d1))
#Result
print "Divergence =",D,"milliradian"