#importing modules
import math
from __future__ import division
#Variable declaration
n2=1.4; #refractive index of cladding
n1=1.43; #refractive index of core
#Calculation
costhetac=n2/n1;
thetac=math.acos(costhetac); #propagation angle(radian)
thetac=thetac*180/math.pi; #propagation angle(degrees)
NA=math.sqrt(n1**2-n2**2); #numerical aperture
thetaa=math.asin(NA); #angle(radian)
thetaa=thetaa*180/math.pi; #angle(degrees)
thetaa=2*thetaa; #acceptance angle(degrees)
#Result
print "propagation angle is",round(thetac,1),"degrees"
print "numerical aperture is",round(NA,4)
print "acceptance angle is",round(thetaa,2),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
z=30; #length of optical fibre(km)
alpha=0.8; #fibre loss(dB/km)
Pi=200; #input power(micro W)
#Calculation
a=alpha*z/10;
b=10**a;
P0=Pi/b; #output power(micro W)
#Result
print "output power is",round(P0,3),"micro W"