# EXAMPLE 9-24 PG NO-608-609
import math
L=20.; # INDUCTANCE
R=2.*L; # RESISTANCE
print '%s %.2f %s' %('i) Resistance (R) is =',R,'ohm');
Wo=math.sqrt(101.);
print '%s %.2f %s' %('ii) Wo (Wo) is =',Wo,'rad/sec');
Q=(Wo*L)/R;
print '%s %.2f' %('iii) Q is = ',Q);
BW=Wo/Q;
print '%s %.2f %s' %('iv) BANDWIDTH (BW) is = ',BW,' rad/sec ');
# EXAMPLE 9-26 PG NO-609-610
C=10.** -6.;
X=5.*10.** 6.;
L=1./(C*X);
print '%s %.2f %s' %('i) INDUCTAR (L) is =',L,' H ');
R=10.*L;
print '%s %.2f %s' %('ii) Resistance (R) is =',R,' ohm ');
W=2.236*10.** 3.;
Q=(W*L)/R;
print '%s %.2f' %('iii) (Q) is = ',Q);
BW=W/Q;
print '%s %.2f %s' %('iv) Band Width (BW) is =',BW,' rad/sec ');
# Example 9-32 PG NO 618-619
import math, cmath
P1=1-1j*50;
P2=1+1j*150;
Z1=0+0j*50;
I=(0.2*Z1)/(P1*P2);
print 'i) Current (I) is = ',I,'A'
L=5.;
R=10.;
C=2.*10.** -5.;
Wo=1/math.sqrt(L*C);
print 'ii) Wo (Wo) is = ',Wo,' rad/sec '
Q=(Wo*L)/R;
print 'iii) Q (Q) is = ',Q;
BW=Wo/Q;
print 'ii) Band Width (BW) is = ',BW,' rad/sec '
# EXAMPLE 9-37 PG NO 623-624
C=1./8.5; # Capacitor
L=1./(17.*C); # Inductar
print '%s %.2f %s' %('ii) Inductar (L) is = ',L,'H');
R=2.*L; # Resistance
print '%s %.2f %s' %('ii) Resistance (R) is = ',R,' ohm ');
# EXAMPLE 9-38 PG NO=624-625
C=1./9.; # CAPACITOR
X=2.; # R/L=X
Y=6-X; # G/C
G=4.*C;
print '%s %.2f %s' %('i) G (G) = ',G,' ohm')
L=0.9;
R=1.8;
# EXAMPLE 9-46 PG NO 630-631
import cmath
ZA=5+1j*3;
YA=1./ZA;
print 'i) Admittance (YA) is = ',YA,' siemens ';
V=100.; # VOLTAGE
IA=V*YA;
print 'ii) Current (IA) is = ',IA,' A ';
# EXAMPLE 9-50 PG NO-632
I1=17.39-1j*4.66; # CURRENT
I2=9+1j*15.68; # CURRENT
I3=-1j*10.95; # CURRENT
I=I1+I2+I3;
print 'i)CURRENT (I) = ',I,' A'
# example 9-56 pg no-636
Z1=8.05+1j*2.156; # IMPEDANCE
XL=2.155;
W=5000;
L=XL/W;
print 'i)INDUCTANCE (L) = ',L,' H'
Z2=4.166-1j*7.216; # IMPEDANCE
Xc=7.216;
C=1/(W*Xc);
print 'ii)CAPACITOR (C) = ',C,' F'
D=11.708; # DIAMETER
XL1=12.81;
L1=XL1/W;
print 'i) INDUCTANCE (L1) = ',L1,' H'