#given
c=3*10**8 #velocity of light
f=4.4*10**14 #frequency of red light
f1=7.0*10**14 #frequency of violet light
#calculation
h1=c/f #wavelength of red light
h2=c/f1 #wavelength of violet light
#result
print"wavelenght for red= ",round(h1,9),"m"
print"wavelngth for violet= ",round(h2,8),"micron"
#given
n1=1.535 #refractive index of fibre optics
n2=1.490 #refractive index of cladding
#calculation
import math
x=(n1**2)-(n2**2)
y=math.sqrt(x) #numerical aperture
z=math.asin(y)*180/3.14 #theta
#result
print"NA = ",round(y,3)
print"(theta)in(max) = ",round(z,1),"degree"
#given
w=22 #spectral width of LED
l=2 #length of fibre
d=95 #dispersion value
p=d*w #pulse dispersion
pt=p*l #total pulse dispersion
#result
print"pulse dispersion = ",p,"ps/km"
print"total pulse dispersion = ",pt,"ps/km"
#given
d=30 #length of fibre cable
l=0.4 #loss
#calculation
T=d*l #total cable loss
#result
print"total cable loss = ",T,"dB"
#given
b=565 #Line bit rate of fibre 1
c=3.5 #Cable dispersion of fibre 1
t=4 #Transmitter spectral width of fibre 1
b1=1130 #Line bit rate of fibre 2
c1=3.5 #Cable dispersion of fibre 2
t1=2 #Transmitter spectral width of fibre 2
x=440000 #assumed gaussian constant
#calculation
L1=x/(b*c*t) #span length in km of fibre 1
L2=x/(b1*c1*t1) #span length in km of fibre 2
#result
print"span lenght of fibre 1= ",round(L1,2),"Km"
print"span lenght of fibre 2= ",round(L2,2),"Km"