from __future__ import division
Ie=12e-3##emitter current
Ic=Ie/1.02##collector current
Ib=Ie-Ic##base current
print "\n Therefore base current is %.0f microA \n"%(Ib*1e6)
from __future__ import division
print "When beta_dc=50 "
beta_dc=50#
alpha_dc=beta_dc/(1+beta_dc)#
print "\n alpha_dc=%.4f \n\n"%(alpha_dc)
print " When beta_dc=190 "
beta_dc=190#
alpha_dc=beta_dc/(1+beta_dc)#
print "\n alpha_dc=%.4f \n\n"%(alpha_dc)
print " When alpha_dc=0.995 "
alpha_dc=0.995#
beta_dc=alpha_dc/(1-alpha_dc)#
print "\n beta_dc=%.0f \n\n"%(beta_dc)
print " When alpha_dc=0.9765 "
alpha_dc=0.9765#
beta_dc=alpha_dc/(1-alpha_dc)#
print "\n beta_dc=%.2f \n"%(beta_dc)
from __future__ import division
Ib=20e-6#
Ie=0.0064#
beta_dc=Ie/Ib-1#
alpha_dc=beta_dc/(1+beta_dc)#
print "\n beta_dc=%.0f \n \n alpha_dc=%f \n"%(beta_dc,alpha_dc)
Ic=beta_dc*Ib##collector current
print "\n collector current is %.3f mA \n"%(Ic*1e3)
from __future__ import division
Icbo=5e-6##leakage current
Ic=20e-3##collector current
Ie=Ic/0.996##Ic=o.996Ie
alpha_dc=Ic/Ie#
print "\n alpha_dc=%.3f \n"%(alpha_dc)
print "We know that Ic=alpha_dc*Ie+Icbo "
print "Therefore emitter current is Ie=(Ic-Icbo)/alpha_dc"
Ie=(Ic-Icbo)/alpha_dc##emitter current
Ie=Ie*1e3#
print "\n emitter current is %.2f mA"%(Ie)