#importing modules
import math
from __future__ import division
#Variable declaration
D=1 #Distance in metre
lamda=589*10**-9 #nm to metres
d=2*10**-3 #mm to metre
#Calculation
beta=(D*lamda)/d
#Result
print"The fringe width beta=",round(beta*10**3,4),"mm"
#importing modules
import math
from __future__ import division
#Variable declaration
N=3 #position
lamda=5450*10**-10 #Wawelength in Armstrong to metre
mu=1.5
#Calculation
t=(N*lamda)/(mu-1)
#Result
print"Thickness of glass plate=",round(t*10**6,2),"micron."
#importing modules
import math
from __future__ import division
#Variable declaration
w=0.02
n=1
lamda=6.56*10**-7
theta=(18+(14/60))*math.pi/180
#Calculation
N=(w*math.sin(theta))/(n*lamda)
#Result
print"Total number of lines n the grating=",round(N)
print"#Answer varies due to rounding of number"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5893*10**-10 #Angstroms to mts
x=4*10**-2
beta=1*10**-3
#Calculation
t=(lamda*x)/(2*beta)
#Result
print"t=",round(t*10**6,3),"micron"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5500
nf=1.38
#Calculation
t=lamda/(4*nf)
#Result
print"The minimum thickness of coating,t=",round(t,1),"Angstroms"
#importing modules
import math
from __future__ import division
#Variable declaration
beta=0.00227 #distance between adjascent green lines
D=2.5
d=0.0006 #distance between narrow slits
#Calculation
lamda=(beta*d)/D
#Result
print"Wavelength,lamda=",round(lamda*10**10),"*10**-10 m"
print"#Answer varies due to rounding of number"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5890*10**-10
mu=1.5
theta=60*math.pi/180 #Converting in to degrees
#Calculation
cos=math.cos(theta)
t=(lamda)/(2*mu*(math.cos(theta)))
#Result
print"Smallest thickness of plate,t=",round(t*10**10),"*10**-10 m"
#importing modules
import math
from __future__ import division
#Variable declaration
R=1
n=5
lamda=5.895*10**-7
dn=0.003
#Calculation
mu=(4*R*n*lamda)/(dn**2)
#Result
print"Refractive index,mu =",mu
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5893;
n=3
d_lamda=6
#Calculation
N=(lamda)/(n*d_lamda)
#Result
print"N =",round(N,1)
print"The number of rulings needed is 328. This is the minimum requirement."
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5.5*10**-7
d=2.54
x=1.22
#Calculation
dtheta=(x*lamda)/d
#Result
print"Smallest angular separation of two stars =",round(dtheta*10**7,3),"*10**-7 radian"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=6500
theta=30*math.pi/180
#Calculation
a=lamda/math.sin(theta)
#Result
print"Slit width value, a=",a,"Angstroms =",round(a*10**-4,1),"micron"
#importing modules
import math
from __future__ import division
#Variable declaration
a2=1
a1=2*a2
#Calculation
r=a1/a2
#Result
print"r=",r,"/1" #r = r/1 = r:1
print"Hence the ratio of the amplitudes= 2:1"
#importing modules
import math
from __future__ import division
#Variable declaration
theta=5*10**-3/2
lamda=5*10**-7
#Calculation
a=(lamda)/theta
print"a=",round(a*10**4),"*10**-4 m","=",a*10**3,"mm"
#importing modules
import math
from __future__ import division
#Variable declaration
N=20
lamda=5000*10**-10 #Angstroms to meters
t=2.5*10**-5
#Calculation
mu_1=(N*lamda)/t
mu=1+(mu_1)
#Result
print"mu-1=",mu_1
print"Refractive index, mu=",mu
#importing modules
import math
from __future__ import division
#Variable declaration
theta=90*math.pi/180 #theta=90 degrees to get maximum number of orders assume
lamda=5890*10**-10
aplusb=2*10**-6 #micro mts to mts
#Calculation
n=(aplusb*math.sin(theta))/lamda
#Result
print"Maximum number of orders=",round(n)