import math
# Variables
theta1 = 30; #degree(Angle of incedence)
n1 = 1.5; #(refractive index for glass)
n2 = 1.36; #(refractive index for ethyl alcohol)
# Calculations
theta2 = math.degrees(math.asin(n1*math.sin(math.radians(theta1))/n2)); #degree(Angle of refraction)
# Results
print "Angle of refraction(degree) : %.2f"%theta2
# Variables
clusters = 10; #no. of clusters
cells = 7; #no. of cells in a cluster
channels = 10; #no. of channels in a cell
# Calculations and Results
F = cells*channels; #no. of full duplex channels/cluster
print "Number of channels per cluster : %.2f"%F
C = clusters*cells*channels; #total no. of channels
print "Total channel capacity : %.2f"%C
# Variables
Asys = 1520.; #km**2
Ch = 1140.; #no. of channels
Acell = 4.; #km**2
i = 3.;
j = 2.; #For hexagon cells
# Calculations and Results
N = i**2+i*j+j**2; #cells in a cluster
print "(a) No. of cells in a cluster : %.2f"%N
Acluster = N*Acell; #km**2
cluster = Asys/Acluster; #no. of clusters
print "(b) Number of clusters : %.2f"%cluster
print "(c) Area of each cellular cluster(km**2) : %.2f"%Acluster
C = cluster*Ch; #system capacity
print "(d) Increased system capacity(No. of channels) : %.2f"%C
#Without frequency reuse :-
c_sys = Asys/Acell; #No. of cell in a system
ch_cell = Ch/c_sys; #No. of channels/cell
print "(e_i) Without frequency reuse, No. of channels/cell : %.2f"%ch_cell
#With frequency reuse :-
ch_cell = Ch/N; #No. of channels/cell
print "(e_ii) With frequency reuse, No. of channels/cell : %.2f"%ch_cell