#Given
fH=2000 #Hz
C=0.01*10**-6 #F
Af=2 #gain
#Calculation
import math
R=1/(2.0*math.pi*fH*C)
Rf=Af-1
#Result
print"In this case R1=Rf=10 Kohm is selected."
wc=20.0 #K radian/s
C=0.01 #micro F
#Calculation
R=1/(wc*C)
#Result
print"The value of resistance is ", R,"K ohm"
#Given
fh=2000 #Hz
C2=0.0033*10**-6 #F
C3=0.0033*10**-6 #F
R0=0.586 #ohm
R1=10000 #ohm
#Calculation
import math
R=1/(2*math.pi*fh*C2)
Rf=R0*R1
#Result
print" R2=R3=",round(R*10**-3,0),"Kohm \n C2=C3=",C2 ,"micro F \n Rf=",Rf*10**-3,"Kohm \n R1=",R1*10**-3,"Kohm"
#Given
R=47*10**3 #ohm
C=0.0022*10**-6 #F
#Calculation
import math
fl=1/(2.0*math.pi*R*C)
#Result
print"The cutoff frequency is ", round(fl*10**-3,2),"KHz"
#Given
C=0.01*10**-6 #f
fh=1000 #Hz
fl=100
#Calculation
R=1/(2.0*math.pi*fh*C)
R1=1/(2.0*math.pi*fl*C)
fc=math.sqrt(fl*fh)
Q=fc/(fh-fl)
#Result
print"(i) Resistance is ", round(R1*10**-3,0),"Kohm"
print"(ii) The value of Q is ",round(Q,2)
#Given
C=0.01 #F
Q=5
Fc=1000 #Hz
Av0=8
a=1000 #Hz
b=1.5*10**3 #Hz
#Calculation
import math
R1=Q/(2.0*math.pi*C*Av0)
R2=(Q/(2.0*math.pi*Fc*C*(2*Q**2-Av0)))*10**3
R3=Q/(math.pi*Fc*C)
Rk=R2*((a/b)**2)
#Result
print"(i) Resistances are \n R1=",round(R1,0),"Kohm \n R2=",round(R2,0),"Kohm \n R3=",round(R3*10**3,0),"Kohm"
print"(ii) The value of resistance is ", round(Rk*10**3,0),"ohm"
#Given
fl=100 #Hz
fh=1000 #Hz
R=159 #Kohm, for low pass filter
C=0.1 #micro F , for low pass filter
R1=15.9 # K ohm, for high pass filter
C1=0.01 #micro F , for high pass filter
R2=10.0 #K ohm
R3=10.0 #K ohm
R4=10.0 #K ohm
#Calculation
Rom=(R2*R3*R4)/(R2+R3+R4)*10**-1
#Result
print"Value of resistance is ", round(Rom,1),"Kohm"
#Given
C=0.047 #micro F
fn=50 #Hz
#Calculation
import math
R=1/(2.0*math.pi*fn*C)
#Result
print"The value of resistance is ", round(R*10**3,0),"Kohm"
#Given
C=0.01 #micro F
R=15 #K ohm
f=2.5 #K ohm
import math
b=2*math.pi*f*C*R
a=-(2*math.atan(b)*180/3.14)
#Result
print"Phase angle is ", round(a,0)
#Given
R=316.0 #ohm
a=10.0
R1=100 #ohm
F1=1.5 *10**3 #Hz
c=5.03*10**7
R6=1.8*10**3
#Calculation
R2=R/a
R3=R1/(R*a-1)
R4=c/F1
R7=6*R6
R8=(R6*R7)/(R6+R7)
print"value of external component are \n R2=",R2,"Kohm \n R3=",round(R3*10**2,1),"Kohm \n R4=R5=", round(R4*10**-3,2)
print" R7=",R7*10**-3,"Kohm \n R8=", round(R8*10**-3,3),"Kohm"