In [26]:

```
from math import sqrt,pi
# Given
l = 5e-7 # wavelength of light in meter
d = 1 # distance of wavefront received on the screen from the opening in meter
n = 80 # no. of half period zone
#Calculations
Rn = sqrt(n * l * d)# calculation for radius of nth half period zone
A = pi * d * l# calculation for area of half period zone
#Result
print("Radius of 80th half period zone = %.3f cm. \nArea of half period zone = %.4f square cm."%(Rn*100,A*10000))
```

In [28]:

```
from math import sqrt
# Given
l = 6e-7 # wavelength of light in meter
f = 0.6 # focal length of convex lens in meter
n = 1 # no. of half period zone
#Calculation
Rn = sqrt(n * l * f)# calculation for radius of half period zone
print("Radius of half period zone = %.1f mm "%(Rn*1000))
```

In [2]:

```
from math import sqrt
# Given
l = 6e-7 # wavelength of light in meter
f = 0.60 #focal length in m
n = 1 # no. of half period zone
#Calculation
r1 = sqrt(f* l ) # because at maxima intensity is four time the individual intensity of light
#Result
print("Radius of 80th half period zone = %.4f mm. "%(r1))
```

In [9]:

```
# Given
l = 6e-7 # wavelength of light in meter
d = 0.5 # distance of observation point from circular opening in meter
r1 = 2e-3 # radius of circular opening in first case in meter
r2 = 2e-2 # radius of circular opening in second case in meter
#Calculation
n1 = (r1**2) / (d * l) # calculation for no. of half period zone in first case
n2 = (r2**2) / (d * l) # calculation for no. of half period zone in second case
print("No. of half period zone in first case = %d \nNo. of half period zone in second case = %d "%(n1,n2))
```

In [33]:

```
# Given
l = 5e-7 # wavelength of light in meter
d = 1e-3 # diameter of the first ring of zone plate in meter
n = 1 # no. of half period zone
#Calculation
D = (d**2) / (4 * l * n) # calculation for distance of screen from opening
#Result
print("Distance of screen from opening = %.1f meter "%D)
```

In [34]:

```
from math import sqrt
# Given
l = 5.893e-7 # wavelength of light in meter
f = 1 # focal-length of convex lens in meter
n1 = 1 # no. of first half period zone
n2 = 3 # no. of second half period zone
n3 = 5 # no. of third half period zone
#Calculations
R1 = sqrt(n1 * l * f) # calculation for Radius of first half period zone
R2 = sqrt(n2 * l * f) # calculation for Radius of second half period zone
R3 = sqrt(n3 * l * f) # calculation for Radius of third half period zone
#Result
print("Radius of first ,second and third half period zone = %.3e, %.3e and %.3e meter respectively. "%(R1,R2,R3))
```

In [36]:

```
from math import sqrt
# Given
l = 5e-7 # wavelength of light in meter
f = 0.2 # focal length of convex lens in meter
n = 10 # no. of half period zone
#Calculation
Rn = sqrt(n * l * f) # calculation for radius of 10th half period zone
#Result
print("Radius of 10th half period zone = %.1f mm. "%(Rn*1000))
```

In [37]:

```
from math import sqrt
# Given
l = 5.89e-7 # wavelength of light in meter
d1 = 1. # distance of wavefront recieved on the screen from the opening in first side in meter
d2 = 2. # distance of wavefront recieved on the screen from the opening in other side in meter
#Calculations
f = (d1 * d2) / (d1 + d2)
p = 1. / f # beacause zone plate act as a convex lens
n = 1 # for first zone
Rn = sqrt(n * l * f) # calculation for radius of first zone
Dn = 2 * Rn # calculation for diameter of first zone
#Result
print("Focal length = %.2f meter. \n Power = %.1f D. \n Diameter of first zone = %.3f mm. "%(f,p,Dn*1000))
```

In [38]:

```
# Given
lambda1 = 6e-7 # wavelength of first light in meter
lambda2 = 5e-7 # wavelength of second light in meter
f1 = 1 # focal length in first case in meter
#Calculation
f2 = (lambda1 * f1) / lambda2 # calculation for focal length in second case
#Result
print("Focal length in second case = %.1f meter"%f2)
```

In [39]:

```
# Given
l = 4e-7 # wavelength of light in meter
u = 0.2 # distance of object from zone plate in meter
v = 0.2 # distance of brightest image from from zone plate in meter
r = 0.01 # radius in meter
#Calculations
f = (u * v) / (u + v) # calculation for focal length
n = (r**2) / (f * l) # calculation for no. of zone of Fresnel
#Result
print("No. of zone of Fresnel = %.f"%n)
```

In [41]:

```
# Given
l = 5.893e-7 # wavelength of light in meter
d = 2.3e-3 # diameter of the central zone of zone plate in meter
u = 6 # distance between point source from zone plate in meter
n = 1 # for central zone
#Calculations
r = d/2
f = (r**2) / (l) # calculation for focal length
v = (f * u) / (u - f) # calculation for distance of first image from zone plate
#Result
print("Distance of first image from zone plate = %.2f meter "%v) #answer differs due to rounding-off values
```

In [43]:

```
# Given
R = 2 # radius of curvature in meter
#Calculation
f = R # calculation for principal focal length of zone plate
#Result
print("Principal focal length of zone plate = %.1f meter "%f)
```

In [44]:

```
from math import asin, pi
# Given
l = 5.89e-7 # wavelength of light in meter
b = 1e-3 # slit-width in meter
m = 1 # for first minima
#Calculation
theta = asin((m * l) / b) # calculation for angular spread of the central maxima in radian
theta_ = theta * (180 / pi) # calculation for angular spread of the central maxima in degree
#Result
print("Angular spread of the central maxima = %.4f degree "%(2 * theta_))
```

In [70]:

```
# Given
d = 1.2 # distance of screen from slit in meter
x = 3.7e-3 # distance between first maxima to central maxima in meter
b = 2e-4 # slit-width in meter
#Calculation
l = (x * b) / d # calculation for wavelength of light
#Result
print "Wavelength of light = ",round(l/1e-10),"A"
```

In [72]:

```
from math import asin, pi
# Given
l = 5.5e-7 # wavelength of light in meter
b = 2.2e-6 # slit-width in meter
#Calculations
m2 = 2 # for second minima
theta2 = asin((m2 * l) / b) * (180 / pi) # calculation for angular position of second minima
m3 = 3 # for third minima
theta3 = asin((m3 * l) / b) * (180 / pi) # calculation for angular position of third minima
#Result
print("Angular position of second and third minima = %.f degrees and %.2f degrees respectively "%(theta2 ,theta3))
```

In [74]:

```
from math import asin, pi
# Given
l = 5.89e-7 # wavelength of light in meter
b = 1.2e-6 # slit-width in meter
#Calculation
m = 1 # for first minima
theta = asin((m * l) / b) # calculation for half angular width of the central bright maxima in radian
theta_ = theta * (180 / pi) # calculation for half angular width of the central bright maxima in degree
#Result
print("Half angular width of the central bright maxima = %.2f degrees "%theta_)
```

In [10]:

```
from math import sin, pi
# Given
l = 5e-7 # wavelength of light in meter
theta = pi / 6 # half angular width of central maximum in first case in radian
theta_ = pi / 2 # half angular width of central maximum in second case in radian
#Calculation
m = 1 # for first minima
b1 = (l * m) / sin(theta) # calculation for slit width in first case
b2 = (l * m) / sin(theta_) # calculation for slit width in second case
#Result
print("Slit width in first case = %.f micro-meter \nSlit width in second case = %.1f micro-meter"%(b1*1e6,b2*1e6))
```

In [15]:

```
from math import asin, pi
# Given
l = 5.89e-7 # wavelength of light in meter
d = 1 # distance of screen from slit in meter
b = 1e-4 # slit-width in meter
#Calculations
theta = (asin(l / b)) * (180 / pi) # calculation for angular spread
x = (2 * d * l) / b# calculation for linear width
#Result
print("Angular spread = %.3f degree\nLinear width = %.3f cm "%(2*theta,x*1e2))
```

In [104]:

```
from math import asin, pi
# Given
l = 6e-7 # wavelength of light in meter
b = 1.2e-6 # slit-width in meter
#Calculations
m = 1 # for first minima
theta = asin((m * l) / b) # calculation for angular width of the central maxima in radian
theta_ = theta * (180 / pi) # calculation for angular width of the central maxima in degree
#Result
print("Angular width of the central maxima = %.f degree "%(2 * theta_))
```

In [105]:

```
# Given
l = 4.890e-7 # wavelength of light in meter
b = 5e-3 # slit-width in meter
f = 0.4 # focal-length of convex lens in meter
#Calculation
m = 1 # for first dark fringe
x = (f * m * l) / b
n = 1 # for first secondary maxima
x_ = ((2 * n + 1) * l * f) / (2 * b)
delta_x = x_ - x # calculation for separation of dark band
#Result
print("Separation of dark band = %.3e meter."%(delta_x))
```

In [106]:

```
# Given
l = 5.893e-7 # wavelength of light in meter
b = 5e-4 # slit-width in meter
f = 1 # focal length of convex lens in meter
#Calculation
x = (2 * l * f) / b # calculation for Separation of dark band on either side of the cenral maximum
#Result
print("Separation of dark band on either side of the central maximum = %.3e meter"%x)
```

In [107]:

```
# Given
d = 4e-4 # separation between slits in meter
b = 8e-5 # slit-width in meter
#Calculations
r = (b + d) / b # calculation for ratio of n with m
m1 = 1
n1 = r * m1 # calculation for Missing orders
m2 = 2
n2 = r * m2 # calculation for Missing orders
m3 = 3
n3 = r * m3 # calculation for Missing orders
#Result
print("Missing orders = %d,%d,%d,......etc."%(n1,n2,n3))
```

In [109]:

```
# Given
d = 4e-4 # separation between slits in meter
b = 2e-4 # slit-width in meter
fringe_width = 2.5e-3 # fringe width in meter
D = 1.6 # distance between screen and slits
#Calculations
l = (fringe_width * d) / D # calculation for wavelength of light
r = (b + d) / b # calculation for ratio of n with m
m1 = 1
n1 = r * m1 # calculation for missing order
m2 = 2
n2 = r * m2 # calculation for missing order
m3 = 3
n3 = r * m3 # calculation for missing order
#Result
print("Wavelength of light = %.3e meter. \nMissing order = %d,%d,%d....etc."%(l,n1,n2,n3))
```

In [115]:

```
from math import pi, sin
# Given
N = 425000 # no. of lines in plane transmission grating per meter
theta = pi / 6 # angle at which second order spectral line is observed in radian
n = 2 # order of spectral line
#Calculation
l = sin(theta) / (2 * N) # calculation for wavelength of light
#Result
print "Wavelength of light = ",round(l/1e-10),"A"
```

In [116]:

```
from math import pi, sin
# Given
N = 500000 # no. of lines in plane transmission grating per meter
theta = pi / 6 # angle at which second order spectral line is observed in radian
n = 2 # order of spectral line
#Calculation
l = sin(theta) / (2 * N) # calculation for wavelength of light
#Result
print "wavelength of light = ",l/1e-10,"A"
```

In [90]:

```
from math import ceil
# Given
lambda2 = 5.461e-7 # wavelength of light in second case in meter
n1 = 4 # no. of order in first case
n2 = 3 # no. of order in second case
#Calculation
lambda1 = (n2 * lambda2) / n1 # calculation for Wavelength of light in first case
#Result
print("Wavelength of light in first case = %d A"%(ceil(lambda1*1e10)))
```

In [117]:

```
from math import pi, sin
# Given
l = 5e-7 # wavelength of light in meter
theta = pi / 6 # angle at which second order spectral line is observed in radian
n = 2 # order of spectral line
#Calculations
k = (n * l) / sin(theta) # calculation for (b+d)
N = 1 / k # calculation for no. of lines in per cm
#Result
print("No. of lines per cm = %.f "%(N / 100))
```

In [118]:

```
from math import asin,pi
# Given
lambda1 = 5.048e-7 # wavelength of light in first case in meter
lambda2 = 5.016e-7 # wavelength of light in second case in meter
n = 2 # no. of order in first case
N = 15000 # no. of lines in grating per inch
#Calculations
k = 2.54 / 1500000 # in meter
theta1 = asin(n * lambda1 / k) * (180 / pi) # calculation for angle in first case
theta2 = asin(n * lambda2 / k) * (180 / pi) # calculation for angle in second case
delta_theta = theta1 - theta2 # calculation for angle of separation
#Result
print("Angle of separation = %.2f degree"%delta_theta)
```

In [119]:

```
from math import asin,pi
# Given
lambda1 = 5.89e-7 # wavelength of light in first case in meter
lambda2 = 5.896e-7 # wavelength of light in second case in meter
n = 2 # no. of order in first case
N = 600000 # no. of lines in grating per meter
#Calculations
k = 1. / N # in meter
theta1 = asin(n * lambda1 / k) * (180 / pi) # calculation for angle in first case
theta2 = asin(n * lambda2 / k) * (180 / pi) # calculation for angle in second case
delta_theta = theta2 - theta1 # calculation for angle of separation
#Result
print("Angle of separation = %.2f degree"%delta_theta)
```

In [97]:

```
from math import pi
# Given
lambda1 = 5.4e-7 # wavelength of light for nth order in meter
lambda2 = 4.05e-7 # wavelength of light for (n+1)th order in meter
theta = pi / 6 # angle of diffraction in radian
#Calculations
k = (lambda1 * lambda2) / ((lambda1 - lambda2) * sin(theta)) # calculation for b+d
N = (1 / k) * (0.01) # calculation for no. of lines per cm
#Result
print("No. of lines per cm = %d "%N)
```

In [127]:

```
from math import pi, cos, sin
# Given
d_theta = 0.01 # angular separation between two wavelengths in radian
theta = pi / 6 # angle of diffraction in radian
l = 5e-7 # wavelength of light in meter
#Calculation
d_lambda = (l * cos(theta) * d_theta) / sin(theta) # calculation for difference in two waveligth
#Result
print "Difference in two wavelength = ",round(d_lambda/1e-10,1),"A"
```

In [99]:

```
# Given
N = 2620 # no. of lines in plane transmission grating per inch
l = 5e-7 # wavelength of incident radiation in meter
#Calculations
k = 2.54 / N * 1 / 100 # calculation for b+d in meter
n = k / l # calculation for order of spectrum
#Result
print("Order of spectrum = %d"%n)
```

In [2]:

```
# Given
N = 500000. # no. of lines in plane transmission grating per meter
l = 5e-7 # wavelength of incident radiation in meter
#Calculations
k = 1 / N # calculation for b+d in meter
n = k / l # calculation for order of spectrum
#Result
print "Order of spectrum = %d"%n
```

In [28]:

```
# Given
N = 4000. # no. of lines in plane transmission grating per meter
lambda1 = 4.e-7 # wavelength of light in first case in meter
lambda2 = 7.e-7 # wavelength of light in second case in meter
#Calculations
b_plus_d = (1/N)*10**-2
n1 = b_plus_d / lambda1 # calculation for Observed order in first case
n2 = b_plus_d / lambda2 # calculation for Observed order in second case
#Result
print "Observed order = %.2f,%.2f"%(n1,n2)
```

In [1]:

```
from math import sqrt
# Given
N = 4000 # no. of lines in grating per meter
l = 5e-5 # wavelength of incident radiation in cm
n = 3 # no. of order
#Calculation
p = (n * N) / (sqrt(1 - (N * n * l)))# dispersive power (p) = d(theta)/d(lambda)
#Result
print "Dispersive power = %.3e rad/m"%p
```

In [31]:

```
# Given
n = 2 # no. of order
lambda1 = 5.89e-7 # wavelength of light in first case in meter
lambda2 = 5.896e-7 # wavelength of light in second case in meter
#Calculation
N = lambda1 / (n * (lambda2 - lambda1)) # calculation for minimum no. of lines in grating
#Result
print "Minimum no. of lines in grating = %.1f"%N
```

In [32]:

```
# Given
n = 1 # no. of order
lambda1 = 5.89e-7 # wavelength of light in first case in meter
lambda2 = 5.896e-7 # wavelength of light in second case in meter
#Calculation
N = lambda1 / (n * (lambda2 - lambda1)) # calculation for minimum no. of lines in grating
#Result
print "Minimum no. of lines in grating = %.2f"%N
```

In [34]:

```
from math import pi,sin
# Given
n = 3 # no. of order
theta = pi / 6 # view angle of third order in radian
lambda1 = 5.89e-7 # min. wavelength of light in meter
lambda2 = 5.896e-7 # max.wavelength of light in meter
#Calculations
mean_lambda = (lambda1 + lambda2) / 2 # calculation for mean wavelength
s = (n * mean_lambda) / sin(theta) # calculation for grating space b+d
N = lambda1 / (n * (lambda2 - lambda1)) # calculation for minimum no. of lines in grating
#Result
print "Grating space = %.3e meter. \nTotal width of ruled surface = %.3e meter. "%(s,s * N)
```

In [35]:

```
# Given
l = 5.5e-7 # wavelength of light in meter
a = 5 # diameter of objective lens of telescope in meter
R = 3.8e8 # distance of moon in meter
#Calculations
theta = (1.22 * l) / a # calculation for angle
x = (R * theta) # calculation for the separation of two points on moon
#Result
print "The separation of two points on moon = %.3f meter"%x
```

In [36]:

```
from math import pi
# Given
l = 5e-7 # wavelength of light in meter
theta = (1e-3) * (pi / 180) # separation angle of stars in radian
#Calculation
a = (1.22 * l) / theta # calculation for diameter of telescope objective
#Result
print "Diameter of telescope objective = %.5f meter"%a
```

In [37]:

```
# Given
l = 6e-7 # wavelength of light in meter
theta = 2.44e-6 # separation angle of stars in radian
#Calculation
a = (1.22 * l) / theta # calculation for diameter of telescope objective
#Result
print "Diameter of telescope objective = %.2f meter"%a
```

In [38]:

```
# Given
l = 5.5e-7 # wavelength of light in meter
a = 0.004 # diameter of objective lens of telescope in meter
x = 1.5e-3 # distance between two pin holes in meter
#Calculations
theta = (1.22 * l) / a # calculation for angle
R = x / theta # calculation for max. distance of pin holes from microscope
#Result
print "Max. distance of pin holes from microscope = %.4f meter"%R
```

In [40]:

```
from math import pi, sin
# Given
l = 5.5e-7 # wavelength of light in meter
theta = pi / 6 # semi-angle of cone in radian
#Calculation
d = (1.22 * l) / (2 * sin(theta)) # calculation for the resolving limit of microscope
#Result
print "The resolving limit of microscope = %.1e meter"%d
```

In [41]:

```
# Given
l = 5.461e-7 # wavelength of light in meter
d = 4e-7 # separation between objects in meter
#Calculation
NA = (1.22 * l) / (2 * d) # calculation for numerical aperture of objective
#Result
print "Numerical aperture of objective = %.3f"%NA
```