from __future__ import division
from numpy import pi, sqrt
#Given data
R = 10 # in ohm
L = 20 # in mH
L = L * 10**-3 # in H
C = 0.05 # in µF
C = C * 10**-6 # in F
f_r = (1/(2*pi))*sqrt( (1/(L*C)) - ((R**2)/(L**2)) ) # in Hz
f_r = round(f_r * 10**-3) # in kHz
print "The resonant frequency = %0.f kHz " %f_r
Q = (2*pi*f_r*10**3*L)/R #Q factor of the tank circuit
print "The Q factor of the tank circuit = %0.1f " %Q
BW = (f_r*10**3)/Q # in Hz
print "The band width of the amplifier = %0.1f Hz " %BW