#Example 24_1
import math
#To find the angle at which the reinforcement line occurs
n=2 #units in constant
lamda=0.7 #units in cm
d=2 #units in cm
theta2=math.asin((n*lamda)/d)*180/math.pi #Units in degrees
print "The angle at which the reinforcement line occurs is theta2=",round(theta2)," degrees"
#Example 24_2
import math
#To find by how much does thickness of air gap increases
lamda=589 #units in nm
gap=round(lamda/2) #units in nm
print "The thickness of air gap increases by=",round(gap)," nm"
#Example 24_3
import math
#To find the thickness that should be coated for minimum reflection
lamda=550 #units in nm
n=1.38 #units in constant
L=(lamda/2)/(2*n) #units in nm
print "The thickness that should be coated for minimum reflection is L=",round(L,1)," nm"
#Example 24_4
import math
#To find out the angle at which the line appears
line=5.89*10**-7 #Units in meters
noline=1/10.0**6 #units in Lines per meter
theta1=math.sin(line/noline)*180/math.pi #units in degrees
#For second order
theta2=math.sin(2*line/noline)*180/math.pi #units in degrees
print "For the first order theta1=",round(theta1)," degrees\nFor the second order theta2=",round(theta2)," degrees"
sinevalue=2*line/noline #units in radians
print "\n As it is impossible for the sine of angle that is=",round(sinevalue,2)," radians to be greater that unity this second order and higher order images doesnot exist"