#Variable declaration
d = 4 #spacing (mm)
D = 100 #distance between the openings (mm)
#Calculation
lambda_short = 10*d #Shortest wavelength (mm)
lambda_long = 2*D #Longest wavelength (mm)
bandwidth = lambda_long/lambda_short #Bandwidth (unitless)
#Result
print "The approximate bandwidth is", bandwidth,"to 1"
from math import atan,pi,log
#Variable declaration
gain_dbi = 7.0 #Gain (dBi)
bandwidth = 4 #Relative bandwidth (unitless)
s_lambda = 0.15 #Spacing (lambda)
k = 1.2 #Scale constant (unitless)
#Calculation
alpha = atan((1-1/k)/(4*s_lambda))*180/pi #Apex angle (degrees)
n = round(log(bandwidth)/log(k)) #Number of elements(unitless)
n += 1
n += 2 #Number of elements considering conservative design (unitless)
#Result
print "The apex angle is", round(alpha,1), "degrees"
print "The number of elements is", n