#Given
C=300*10**(-12) #F, capacitance
L=220*10**(-6) #H, inductance
R=20.0 #Ohms, resistance
#Calculation
import math
fr=1/(2*math.pi*math.sqrt(L*C)) #resonant frequency
#result
print " The Resonant Frequency, fr = ",round(fr/10**3,0),"khz"
#(b) find The Impedance at Resonance
#Calculation
Rr=R
#result
print " The Impedance at Resonance, Rr = ",Rr,"ohm"
#(c) find The Current at Resonance
V=10.0 #V, voltage
#Calculation
I=V/R
#result
print " The Current at Resonance, I = ",I,"A"
#(d)
#Calculation
fr=1/(2*math.pi*math.sqrt(L*C))
I=V/R
Xl=2*math.pi*fr*L #reactance of inductor
Vl=I*Xl # Voltage across the Inductance
Xc=1/(2*math.pi*fr*C) #reactance of capacitance
Vc=I*Xc # Voltage across the Capacitance,
Vr=I*R #Voltage across the Resistance
#result
print " Voltage across the Inductance, Vl = ",round(Vl,0),"V"
print " Voltage across the Capacitance, Vc = ",round(Vc,0),"V"
print " Voltage across the Resistance, Vr = ",round(Vr,0),"V"
C=100*10**(-12) #F
L=100*10**(-6) #H
R=10 #Ohms
V=100 #V
#Calculation
import math
fr=1/(2*math.pi*math.sqrt(L*C)) #Hz, resonant frequency
Xl=2*math.pi*fr*L #ohm, inductive reactance
Il=V/Xl #A, current in inductive branch
Xc=1/(2*math.pi*fr*C) #ohm, capacitance reactance
Ic=V/Xc #A, current in capacitive branch
Zp=L/(R*C) #ohm , series impedance
I=V/Zp #A, line current
#Result
print "fr= ",round(fr/10**3,0),"khz"
print "Il= ",Il,"A"
print "Ic= ",Ic,"A"
print "Zp= ",Zp,"ohm"
print "I= ",I/10**(-3),"mA"
import math
C=100*10**(-12) #F, capacitance
L=150*10**(-6) #H, inductance
R=15 #Ohms, resistance
#Calculation
fr=1/(2*math.pi*math.sqrt(L*C))
Zp=L/(R*C)
Q=2*math.pi*fr*L/R
df=fr/Q #Bandwidth
#The Result
print " Impedance, Zp= ",Zp/10**3,"kohm"
print " Quality Factor, Q= ",round(Q,1)
print " Bandwidth, df= ",round(df/10**3,2),"khz"