In [4]:

```
#importing modules
from __future__ import division
import math
#Variable declaration
beta = 0.51; #Fringe width(mm)
d = 2.2; #Distance between the slits(mm)
D = 2; #Distance between the slits and the screen(m)
#Calculation
beta = beta*10**-1; #Fringe width(cm)
d = d*10**-1; #Distance between the slits(cm)
D=D*10**2; #Distance between the slits and the screen(cm)
lamda = beta*d/D; #Wavelength of light(cm)
lamda = lamda*10**8; #Wavelength of light(A)
#Result
print "The wavelength of light is",lamda, "angstrom"
```

In [5]:

```
#importing modules
from __future__ import division
import math
#Variable declaration
lambda1 = 4250; #First wavelength emitted by source of light(A)
lambda2 = 5050; #Second wavelength emitted by source of light(A)
D = 1.5; #Distance between the source and the screen(m)
d = 0.025; #Distance between the slits(mm)
n = 3; #Number of fringe from the centre
#Calculation
lambda1 = lambda1*10**-10; #First wavelength emitted(m)
lambda2 = lambda2*10**-10; #Second wavelength emitted(m)
d = d*10**-3; #Distance between the slits(m)
x3 = n*lambda1*D/d; #Position of third bright fringe due to lambda1(m)
x3_prime = n*lambda2*D/d; #Position of third bright fringe due to lambda2(m)
x = x3_prime-x3; #separation between the third bright fringe(m)
x = x*10**2; #separation between the third bright fringe(cm)
#Result
print "The separation between the third bright fringe due to the two wavelengths is",x, "cm"
```

In [6]:

```
#importing modules
import math
#Variable declaration
lamda = 5.5*10**-5; #Wavelength emitted by source of light(cm)
n = 4; #Number of fringes shifted
t = 3.9*10**-4; #Thickness of the thin glass sheet(cm)
#Calculation
mew = (n*lamda/t)+1; #Refractive index of the sheet of glass
mew = math.ceil(mew*10**4)/10**4; #rounding off the value of v to 4 decimals
#Result
print "The refractive index of the sheet of glass is",mew
```

In [7]:

```
#importing modules
import math
#Variable declaration
lamda = 5893; #Wavelength of monochromatic lihgt used(A)
n = 1; #Number of fringe for the least thickness of the film
cosr = 1; #for normal incidence
mew = 1.42; #refractive index of the soap film
#Calculation
#As for constructive interference,
#2*mew*t*cos(r) = (2*n-1)*lambda/2, solving for t
t = (2*n-1)*lamda/(4*mew*cosr); #Thickness of the film that appears bright(A)
#As for destructive interference,
#2*mu*t*cos(r) = n*lambda, solving for t
t1 = n*lamda/(2*mew*cosr); #Thickness of the film that appears bright(A)
#Result
print "The thickness of the film that appears bright is",t, "angstrom"
print "The thickness of the film that appears dark is",t1, "angstrom"
```

In [12]:

```
#importing modules
import math
#Variable declaration
lamda = 5893; #Wavelength of monochromatic lihgt used(A)
n = 10; #Number of fringe that are found
d = 1; #Distance of 10 fringes(cm)
#Calculation
beta = d/n; #Fringe width(cm)
lamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)
theta = lamda/(2*beta); #Angle of the wedge(rad)
theta = theta*10**4;
theta = math.ceil(theta*10**4)/10**4; #rounding off the value of theta to 4 decimals
#Result
print "The angle of the wedge is",theta,"*10**-4 rad"
```

In [13]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
lamda = 5900; #Wavelength of monochromatic lihgt used(A)
t = 0.010; #Spacer thickness(mm)
l = 10; #Wedge length(cm)
#Calculation
t = t*10**-1; #Spacer thickness(cm)
theta = t/l; #Angle of the wedge(rad)
lamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)
beta = lamda/(2*theta); #Fringe width(cm)
#Result
print "The separation between consecutive bright fringes is",beta, "cm"
```

In [14]:

```
#importing modules
import math
#Variable declaration
D4 = 0.4; #Diameter of 4th dark ring(cm)
D12 = 0.7; #Diameter of 12th dark ring(cm)
#Calculation
#We have (dn_plus_k**2)-Dn**2 = 4*k*R*lamda
#D12**2-D4**2 = 32*R*lamda and D20**2-D12**2 = 32*R*lamda for k = 8
#since RHS are equal, by equating the LHS we get D12**2-D4**2 = D20**2-D12**2
D20 = math.sqrt((2*D12**2)-D4**2); #Diameter of 20th dark ring(cm)
D20 = math.ceil(D20*10**4)/10**4; #rounding off the value of D20 to 4 decimals
#Result
print "The diameter of 20th dark ring is",D20, "cm"
```

In [15]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
Dn = 0.30; #Diameter of nth dark ring with air film(cm)
dn = 0.25; #Diameter of nth dark ring with liquid film(cm)
#Calculation
mew = (Dn/dn)**2; #Refractive index of the liquid
#Result
print "The refractive index of the liquid is", mew
```

In [16]:

```
#importing modules
import math
#Variable declaration
x = 0.002945; #Distance through which movable mirror is shifted(cm)
N = 100; #Number of fringes shifted
#Calculation
x = x*10**-2; #Distance through which movable mirror is shifted(m)
lamda = 2*x/N; #Wavelength of light(m)
lamda = lamda*10**10; #Wavelength of light(A)
#Result
print "The wavelength of light is",lamda, "angstrom"
```

In [17]:

```
#importing modules
import math
#Variable declaration
lambda1 = 5896; #Wavelength of D1 line of sodium(A)
lambda2 = 5890; #Wavelength of D2 line of sodium(A)
#Calculation
lamda = (lambda1+lambda2)/2;
x = (lamda**2)/(2*(lambda1-lambda2)); #Shift in movable mirror of Michelson Interferometer(A)
x = x*10**-7; #Shift in movable mirror of Michelson Interferometer(mm)
x = math.ceil(x*10**4)/10**4; #rounding off the value of D20 to 4 decimals
#Result
print "The shift in movable mirror is",x, "mm"
```

In [ ]:

```
```