In [1]:

```
import math
from __future__ import division
#initialisation of variables
delta_lambda=60e-9; #delta lambda in m
lambda1=1550e-9; #wavelength in m
c=3e8; #velocity of light in m/s
CS=75*1e9; #Channel spacing in Hz
Power_margin=30; #power margin in dB
Fiber_loss=0.25; #fiber loss in dB/Km
channel_capacity=2.5*1e9; #channel capacity STM-16 in bps
#CALCULATIONS
delta_f=(c*delta_lambda)/lambda1**2; #frequency bandwidth in Hz
transmission_distance=Power_margin/Fiber_loss; #Transmission distance in Km
No_channels=(delta_f/CS); #No. of channels
distance_bitrate_product=No_channels*channel_capacity*transmission_distance; #distance bitrate product in bpsKm
#RESULTS
print"Frequency bandwidth =",round(delta_f/1e12,5),"x10^12Hz"; #division by 1e12 to convert unit from Hz to 10^12 Hz
print"Transmission distance =",round(transmission_distance,5),"Km";
print"No. of channels=",round(No_channels);
print"Distance bitrate product =",round(distance_bitrate_product/1e12),"Tbits/sKm"; #division by 1e12 to convert unit from bits/sKm to Tbits/sKm
```