#importing modules
import math
from __future__ import division
#Variable declaration
n1=1.545; #refractive index of optical fibre core
n2=1.495; #refractive index of cladding
#Calculation
CA=math.asin(n2/n1); #critical angle(radian)
CA=CA*180/math.pi; #critical angle(degree)
CAm=int(CA);
CAs=int(60*(CA-CAm));
AA=math.asin(math.sqrt(n1**2-n2**2)); #acceptance angle(radian)
AAd=AA*180/math.pi; #acceptance angle(degree)
AAm=int(AAd);
AAs=int(60*(AAd-AAm));
NA=math.sin(AA); #numerical aperture
#Result
print "The critical angle is",CAm,"degrees",CAs,"minutes"
print "The acceptance angle is",AAm,"degrees",AAs,"minutes"
print "The numerical aperture is",round(NA,4)
print "answer varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
n1=1.54; #refractive index of optical fibre core
n2=1.5; #refractive index of cladding
#Calculation
NA=math.sqrt(n1**2-n2**2); #numerical aperture
#Result
print "The numerical aperture is",round(NA,4)
#importing modules
import math
from __future__ import division
#Variable declaration
n1=1.55; #refractive index of optical fibre core
n2=1.47; #refractive index of cladding
#Calculation
CA=math.asin(n2/n1); #critical angle(radian)
CA=CA*180/math.pi; #critical angle(degree)
CAm=int(CA);
CAs=int(60*(CA-CAm));
NA=math.sqrt(n1**2-n2**2); #numerical aperture
AA=math.asin(NA); #acceptance angle(radian)
AAd=AA*180/math.pi; #acceptance angle(degree)
AAm=int(AAd);
AAs=int(60*(AAd-AAm));
#Result
print "The critical angle is",CAm,"degrees",CAs,"minutes"
print "The acceptance angle is",AAm,"degrees",AAs,"minutes"
print "The numerical aperture is",round(NA,4)
print "answer for acceptance angle and numerical aperture given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
n2=1.55; #refractive index of cladding
no=1.33; #refractive index of water
NA=0.20; #numerical aperture of optical fibre
#Calculation
n1=math.sqrt(n2**2+NA**2); #refractive index of optical fibre
NAW=math.sqrt(n1**2-n2**2)/no; #numerical aperture when fibre is in water
AA=math.asin(NAW); #Acceptance angle for the fibre in water(degrees)
AAd=AA*180/math.pi; #acceptance angle(degree)
AAm=int(AAd);
AAs=int(60*(AAd-AAm));
#Result
print "The refractive index of optical fibre is",round(n1,4)
print "The numerical aperture when fibre is in water is",round(NAW,2)
print "The Acceptance angle for the fibre in water is",AAm,"degrees",AAs,"minutes"
print "answer for minutes varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
NA=0.22; #numerical aperture of optical fibre
no=0.012; #refractive index difference
#Calculation
n1=NA/math.sqrt(2*no); #The refractive index of the core of a fibre
n2=n1*(1-no); #The refractive index of the cladding
#Result
print "The refractive index of the core of a fibre is",round(n1,2)
print "The refractive index of the cladding is",round(n2,3)
print "answer varies due to rounding off errors"