from __future__ import division
hie=1.0*10**3
hre=1*10**-4
hoe=100*10**-6
RC=1000
RS=1000
rL=RC
hfe=50
Ai=-hfe/(1+hoe*rL)
Ri=hie+hre*Ai*rL
Ris=Ri
print 'Ris=%0.2f Ohm'%Ris
delh=hie*hoe-hre*hfe
his=1000
Ro=(RS+his)/(RS*hoe+delh)
print 'Ro=%0.2f kohm'%(Ro*10**-3)
Ros=(Ro*rL)/(Ro+rL)
print 'Ros=%0.2f ohm'%Ros
Ais=(Ai*RS)/(RS+Ris)
print "Ais=%0.2f"%Ais
Av=(Ai*rL)/Ri
Avs=(Av*Ris)/(RS+Ris)
print "Avs=%0.2f"%Avs
from __future__ import division
hie=1.1*10**3
hre=2.5*10**-4
hfe=50
hoe=25*10**-6
rs=1*10**3
rL=1*10**3
Ai=hfe/(1+hoe*rL)
print "Ai=%0.2f "%Ai
Ri=hie+hre*Ai*rL
print 'Ri=%0.2f Ohm'%Ri
Av=(Ai*rL)/Ri
print "Av=%0.2f "%Av
from __future__ import division
RC=4*10**3
RB=40*10**3
RS=10*10**3
hie=1100
hfe=50
hre=0
hoe=0
RB2=40*10**3
rL=(RC*RB2)/(RC+RB2)
Ai=-hfe/(1+hoe*rL)
Ri=hie+hre*Ai*rL
Av=(Ai*rL)/Ri
RB1=40*10**3/(1-Av)
Ris=(Ri*RB1)/(Ri+RB1)
print 'Ris=%0.2f ohm'%Ris
Ros=rL##Ro=infinity
print 'Ros=%0.2f ohm'%Ros
Avs=(Av*Ris)/(RS+Ris)
print "Avs=%0.2f "%Avs
from __future__ import division
hib=28
hfb=-0.98
hrb=5*10**-4
hob=0.34*10**-6
rL=1.2*10**3
Rs=0
Ai=-hfb/(1+hob*rL)
print "Ai=%0.2f"%Ai
Ri=hib+hrb*Ai*rL
print 'Ri=%0.2f ohm'%Ri
delh=hib*hob-hrb*hfb
Ro=(Rs+hib)/(Rs*hib+delh)
print 'Ro=%0.2f kohm'%(Ro*10**-3)
Av=(Ai*rL)/Ri
print "Av=%0.2f"%Av
from __future__ import division
hic=2*10**3
hfc=-51
hrc=1
hoc=25*10**-6
rL=5*10**3
RE=5*10**3
Rs=1000
R1=10*10**3
R2=10*10**3
Ai=-hfc/(1+hoc*rL)
print "Ai=%0.2f"%Ai
Ri=hic+hrc*Ai*rL
print 'Ri=%0.2f kohm'%(Ri*10**-3)
a=(R1*R2)/(R1+R2)
Ris=(Ri*a)/(Ri+a)
print 'Ris=%0.2f ohm'%Ris
Ro=-(Rs+hic)/hfc
Ros=(Ro*RE)/(Ro+RE)
print 'Ros=%0.2f ohm'%Ros
Ais=(Ai*Rs)/(Rs+Ris)
print "Aid=%0.2f"%Ais
Av=(Ai*rL)/Ri
print "Av=%0.2f"%Av
Avs=(Av*Ris)/(Rs+Ris)
print "Avs=%0.2f"%Avs
from __future__ import division
hie=1500
hfe=50
hre=50*10**-4
hoe=20*10**-6
RC=5*10**3
RL=10*10**3
R1=20*10**3
R2=10*10**3
rL=(RC*RL)/(RC+RL)
Ai=-hfe
Ri=hie
a=(R1*R2)/(R1+R2)
Ris=(Ri*a)/(Ri+a)
print 'Ris=%0.2f kohm'%(Ris*10**-3)
Ro=1/hoe
Ros=(Ro*rL)/(Ro+rL)##correction
print 'Ros=%0.2f kohm'%(Ros*10**-3)
Avs=(Ai*rL)/Ri
print "Avs=%0.2f"%Avs
Ais=Ai##correction
print "Ais=%0.2f"%Ais
from __future__ import division
from math import sqrt
RC=12*10**3#
RL=4.7*10**3#
R1=33*10**3#
R2=4.7*10**3#
IC=1*10**-3#
hiemin=1*10**3#
hiemax=5*10**3#
hfemin=70#
hfemax=350#
hie=sqrt(hiemin*hiemax)#
print 'hie=%0.2f kohm'%(hie*10**-3)
hfe=sqrt(hfemin*hfemax)#
print 'hfe=%0.2f ohm'%hfe ##answer printed in the book is wrong
Ri=hie#
a=(R1*R2)/(R1+R2)#
Ris=(Ri*a)/(Ri+a)#
print 'Ris=%0.2f kohm'%(Ris*10**-3)
Ai=hfe#
rc=(RC*RL)/(RC+RL)#
Avs=(Ai*rc)/Ri#
print "Avs=%0.2f"%Avs
from __future__ import division
RB=330*10**3
RC=2.7*10**3
hfe=120
hie=1.175*10**3
hoe=20*10**-6
Ri=hie
Ris=(hie*RB)/(hie+RB)
print 'Ris=%0.2f kohm'%(Ris*10**-3)
Ro=1/hoe
Ros=(Ro*RC)/(Ro+RC)
print 'Ros=%0.2f kohm'%(Ros*10**-3)
Ai=hfe
print "Ai=%0.2f"%Ai
Av=(hfe*RC)/Ri
print "Av=%0.2f"%Av
from __future__ import division
hfe=50
hfb=-hfe/(1+hfe)
print "hfb=%0.2f"%hfb
hfc=-(1+hfe)
print "hfc=%0.2f"%hfc
from __future__ import division
hie=1100
hre=2.5*10**-4
hfe=50
hoe=24*10**-6
rL=10*10**3
RS=1*10**3
hic=hie
hrc=1-hre
hfc=-(1+hfe)
Ai=hfc/(1+hoe*rL)
print "Ai=%0.2f"%Ai
Ri=hie+hrc*-Ai*rL
print 'Ri=%0.2f kohm'%(Ri*10**-3)
Av=(-Ai*rL)/Ri
print "Av=%0.2f"%Av