#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5*10**-5; #wavelength(cm)
k=2; #order
theta=30*math.pi/180; #angle(radian)
#Calculation
e=k*lamda/math.sin(theta); #number of lines(cm)
n=1/e; #number of lines per centimeter
#Result
print "number of lines per centimeter is",int(round(n))
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5000*10**-8; #wavelength(cm)
e=1/6000; #number of lines(cm)
#Calculation
theta1=math.asin(lamda/e)*180/math.pi; #angle for 1st order(degrees)
theta2=math.asin(3*lamda/e)*180/math.pi; #angle for 3rd order(degrees)
theta=round(theta2,1)-round(theta1,1); #difference in angles of deviation(degrees)
#Result
print "difference in angles of deviation is",theta,"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5890*10**-5; #wavelength(cm)
dlamda=6*10**-5; #difference in wavelength(cm)
k=2; #order
w=2.5; #width(cm)
#Calculation
N=lamda/(k*dlamda*w); #minimum number of lines per cm
#Result
print "minimum number of lines per cm is",round(N,2)
print "answer given in the book varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5890*10**-8; #wavelength(cm)
dlamda=6*10**-8; #difference in wavelength(cm)
w=2; #width(cm)
n=425; #number of lines on grating
k=2; #order
#Calculation
N=w*n; #number of lines on grating
N1=int(round(lamda/dlamda)); #number of lines required for resolution
N2=int(round(lamda/(k*dlamda))); #number of lines required for resolution
#Result
print "number of lines required for resolution is",N1,"and number of lines on grating is",N
print "hence lines will not be resolved"
print "number of lines required for resolution is",N2,"and number of lines on grating is",N
print "hence lines will appear resolved"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda1=5016*10**-8; #wavelength(cm)
lamda2=5048*10**-8; #difference in wavelength(cm)
k=2; #order
n=15000; #number of lines/inch
#Calculation
e=2.54/n;
theta1=math.asin(2*lamda1/e)*180/math.pi; #angle for 1st wavelength(degrees)
theta2=math.asin(2*lamda2/e)*180/math.pi; #angle for 2nd wavelength(degrees)
theta=int(60*(theta2-theta1)); #angle of separation(minutes)
#Result
print "angle of separation is",theta,"minutes"
#importing modules
import math
from __future__ import division
#Variable declaration
n=4000; #number of lines/cm
lamda=5000*10**-8; #wavelength(cm)
k=3; #order
#Calculation
e=1/n;
sintheta=k*lamda/e;
costheta=math.sqrt(1-sintheta**2);
dthetabydlamda=k*n/costheta; #dispersive power of grating
#Result
print "dispersive power of grating is",int(dthetabydlamda)
#importing modules
import math
from __future__ import division
#Variable declaration
n=5000; #number of lines/cm
lamda=6000*10**-8; #wavelength(cm)
#Calculation
e=1/n;
k=e/lamda; #highest order of spectrum
#Result
print "highest order of spectrum is",int(k)
#importing modules
import math
from __future__ import division
#Variable declaration
theta=10*math.pi/180; #angle(radian)
dtheta=3*math.pi/(60*60*180); #difference of angle(radian)
dlamda=5*10**-9; #wavelength(cm)
k=2;
#Calculation
lamda=math.sin(theta)*dlamda/(math.cos(theta)*dtheta);
lamdanew=lamda+dlamda; #wavelength of lines(cm)
N=lamda/(dlamda*k);
Ne=N*k*lamda/math.sin(theta); #minimum grating width required(cm)
#Result
print "wavelength of lines is",round(lamda*10**8,1),"*10**-8 cm"
print "answer given in the book varies due to rounding off errors"
print "minimum grating width required is",round(Ne,1),"cm"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=5000*10**-8; #wavelength(cm)
sintheta1=0.2;
sintheta2=0.3;
w=2.5; #width of grating(cm)
#Calculation
e=lamda/(sintheta2-sintheta1); #grating element is
N=2*w/e; #resolving power
#Result
print "grating element is",int(e*10**4),"*10**-4","cm"
print "resolving power is",int(round(N))
#importing modules
import math
from __future__ import division
#Variable declaration
d=2; #diffraction observed(m)
lamda=500*10**-9; #wavelength(m)
a=1.5*10**-3; #slit width(m)
#Calculation
w=2*d*lamda/a; #width of central maxima(m)
#Result
print "width of central maxima is",round(w*10**3,2),"mm"
#importing modules
import math
from __future__ import division
#Variable declaration
d=2; #diffraction observed(m)
lamda=500*10**-9; #wavelength(m)
x=5*10**-3; #width of central maxima(m)
#Calculation
a=d*lamda/x; #slit width(m)
#Result
print "slit width is",a*10**3,"mm"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=6000*10**-10; #wavelength(m)
a=12*10**-7; #slit width(m)
#Calculation
theta=math.asin(lamda/a)*180/math.pi; #half angular width(degrees)
#Result
print "half angular width is",int(theta),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
b=0.8; #distance(mm)
a=0.16; #slit width(mm)
p1=1;
p2=2;
p3=3;
#Calculation
nbyp=(a+b)/a; #ratio of missing orders
n1=int(nbyp*p1);
n2=int(nbyp*p2);
n3=int(nbyp*p3); #missing orders
#Result
print "the orders",n1,n2,n3,"etc will be missing"
#importing modules
import math
from __future__ import division
#Variable declaration
N=6000*10**2; #number of lines/m
m=3; #order
lamda1=500*10**-9; #wavelength(m)
lamda2=510*10**-9; #wavelength(m)
#Calculation
sintheta1=m*N*lamda1;
theta1=math.asin(sintheta1)*180/math.pi; #angle(degrees)
sintheta2=m*N*lamda2;
theta2=math.asin(sintheta2)*180/math.pi; #angle(degrees)
theta=theta2-theta1; #angular separation(degrees)
#Result
print "angular separation is",round(theta,2),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
N=15000/2.54*10**2; #number of lines/cm
lamda=600*10**-9; #wavelength(m)
#Calculation
m=1/(N*lamda); #highest order that can be seen
#Result
print "highest order that can be seen is",int(m)
#importing modules
import math
from __future__ import division
#Variable declaration
N=10000/2*10**2; #number of lines/m
m=1; #order
lamda1=5890*10**-10; #wavelength(m)
lamda2=5896*10**-10; #wavelength(m)
#Calculation
sintheta1=m*N*lamda1;
theta1=math.asin(sintheta1)*180/math.pi; #angle(degrees)
sintheta2=m*N*lamda2;
theta2=math.asin(sintheta2)*180/math.pi; #angle(degrees)
theta=theta2-theta1; #angular separation(degrees)
#Result
print "angular separation is",round(theta,3),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
theta=15*math.pi/180; #angle(radian)
lamda=6500*10**-8; #wavelength(cm)
n=1; #order
#Calculation
a=n*lamda/math.sin(theta); #slit width(cm)
#Result
print "slit width is",round(a*10**4,2),"*10**-4 cm"
#importing modules
import math
from __future__ import division
#Variable declaration
theta=15*math.pi/180; #angle(radian)
a=2.5*10**-6; #slit width(m)
#Calculation
lamda=a*math.pi*math.sin(theta)*10**10/(1.43*math.pi); #wavelength of light(angstrom)
#Result
print "wavelength of light is",int(lamda),"angstrom"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
n=2; #order
N=4250; #grating lines(lines/cm)
theta=30*math.pi/180; #angle(radian)
#Calculation
e=1/N;
lamda=e*math.sin(theta)*10**8/n; #wavelength of spectral line(angstrom)
#Result
print "wavelength of spectral line is",int(lamda),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
n=1; #order
a=1*10**-6; #slit width(m)
lamda=600*10**-9; #wavelength of spectral line(m)
#Calculation
theta=math.asin(n*lamda/a)*180/math.pi; #angular separation(degrees)
#Result
print "angular separation is",round(theta,4),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
N=10520; #grating lines(lines/cm)
theta=90*math.pi/180; #angle(radian)
lamda=5*10**-5; #wavelength of spectral line(cm)
#Calculation
e=1/N;
n=e*math.sin(theta)/lamda; #order
#Result
print int(round(n)),"orders can be seen"
#importing modules
import math
from __future__ import division
#Variable declaration
x=4.2*10**-3; #distance(m)
D=60*10**-2; #screen slit distance(m)
lamda=6000*10**-10; #wavelength(m)
#Calculation
d=D*lamda/x; #slit width(m)
#Result
print "slit width is",round(d*10**4,3),"*10**-4 m"
#importing modules
import math
from __future__ import division
#Variable declaration
N=15000/2.54; #number of lines(per cm)
lamda=6000*10**-8; #wavelength(cm)
#Calculation
d=1/N; #slit width(m)
m=d/lamda; #possible order of spectra
#Result
print "possible order of spectra is",int(round(m))
#importing modules
import math
from __future__ import division
#Variable declaration
D=150; #slit screen distance(cm)
d=0.03; #separation(cm)
beta=0.3; #fringe separation(cm)
#Calculation
lamda=d*beta*10**8/D; #wavelength of light(angstrom)
#Result
print "wavelength of light is",int(round(lamda)),"angstrom"