VCC=30 #collector voltage(V)
RC=3 #Collector resistance (KOhm)
ICsat=VCC/RC #Saturation current(mA)
VCEc=VCC #VCE cutoff voltage(V)
print 'Saturation current IC(saturation) = ',ICsat,'mA'
print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'
VCC=9 #collector voltage(V)
RC=3 #Collector resistance(KOhm)
ICsat=VCC/RC #Saturation current(mA)
VCEc=VCC #VCE cutoff voltage(V)
print 'Saturation current IC(saturation) = ',ICsat,'mA'
print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'
VCC=15 #collector voltage(V)
RC=1 #Collector resistance(KOhm)
ICsat=VCC/RC #Saturation current(mA)
VCEc=VCC #VCE cutoff voltage(V)
print 'Saturation current IC(saturation) = ',ICsat,'mA'
print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'
VCC=15 #collector voltage(V)
RC=3 #Collector resistance(KOhm)
ICsat=VCC/RC #Saturation current(mA)
VCEc=VCC #VCE cutoff voltage(V)
print 'Saturation current IC(saturation) = ',ICsat,'mA'
print 'Collector emitter cutoff VCE(cutoff) = ',VCEc,'V'
VCC=15.0 #collector voltage(V)
RC=3 #collector resistance (KOhm)
VBB=15.0 #base voltage(V)
RB=1 #base resistance (MOhm)
Bdc=100 #current gain
IB1=(VBB/RB) #base current(uA)
IC1=Bdc*IB1/1000 #Collector current(mA)
VCE1=VCC-(IC1*RC) #Collector-emitter voltage(V)
IB2=((VBB-0.7)/RB) #base current(uA)
IC2=Bdc*IB2/1000 #Collector current(mA)
VCE2=VCC-(IC2*RC) #Collector-emitter voltage(V)
print 'Collector emitter voltage VCE1 = ',VCE1,'V'
print 'For second approx., collector emitter voltage VCE2 = ',VCE2,'V'
VCC=20.0 #collector voltage(V)
RC=10 #collector resistance (KOhm)
VBB=10.0 #base voltage(V)
RB=1 #base resistance (MOhm)
Bdc=50 #current gain
IB=(VBB/RB) #base current(uA)
IC=Bdc*IB/1000 #Collector current(mA)
VCE=VCC-(IC*RC) #Collector-emitter voltage(V)
print 'Collector emitter voltage VCE = ',VCE,'V'
print 'So, transistor is in active region.'
VCC=20.0 #collector voltage(V)
RC=5 #collector resistance (KOhm)
VBB=10.0 #base voltage(V)
RB=100 #base resistance(KOhm)
Bdco=50 #old current gain
ICsat=VCC/RC #Saturation current(mA)
IB=VBB/RB #base current(mA)
IC=Bdc*IB/1000 #Collector current(mA)
VCE=VCC-(IC*RC) #Collector-emitter voltage(V)
Bdcn=ICsat/IB #New current gain
print 'ICsat = ',ICsat,'mA'
print 'Bdc = ',int(Bdcn)
print 'Current can not be more than ICsat So, current gain will decrease.'
print 'So, transistor has two current gain: active region & saturation region.'
VCC=5.0 #collector voltage(V)
ICEO=50 #Collector leakage current(nA)
RC=1 #collector resistance (KOhm)
VBB=10.0 #base voltage(V)
RB=10 #base resistance(KOhm)
VCEs=0.15 #VCE saturation(V)
VCE=VCC-((ICEO*RC)*10**-6) #Collector-emitter voltage(V)
print 'Two values of output voltage are 0 and 5 V'
print 'first voltage is voltage across saturated transistor = ',VCEs,'V'
print 'Second voltage is: VCE = ',round(VCE,2),'V'
VCC=15 #collector voltage(V)
VBB=5 #Base voltage(V)
RC=2 #collector resistance (KOhm)
VBE=0.7 #base voltage(V)
RB=100 #base resistance(KOhm)
RE=1 #emitter resistance(KOhm)
VE=VBB-VBE #Emitter voltage(V)
IE=(VE/RE) #emitter current(mA)
IC=IE #Collector current(mA)
VC=VCC-(IC*RC) #Collector-emitter voltage(V)
VCE=VC-VE #Collector-emitter voltage(V)
print 'Emitter current IE = ',IE,'mA'
print 'Emitter voltage VE = ',VE,'V'
print 'Collector emitter voltage VCE = ',VCE,'V'
VCC=20 #collector voltage(V)
VBB=15 #Base voltage(V)
VBE=0.7 #base voltage(V)
RE=1.5 #emitter resistance(KOhm)
IE=25.0 #emitter current(mA)
VE=IE*RE #emitter current(mA)
RE=(VBB/IE)*1000 #emitter resistance(KOhm)
RE2=((VBB-VBE)/IE)*1000 #emitter resistance(KOhm)
print 'Emitter voltage VE = ',VE,'V'
print 'Emitter resistance RE = ',RE,'Ohm'
print 'Emitter resistance RE2 = ',RE2,'Ohm'