import math
#Variables
IC = 10.0 #Collector current (in milli-Ampere)
VCE = 10.0 #Collector-to-emitter voltage (in volts)
hie = 500.0 #Input resistance (in ohm)
hoe = 10 **-5 #Output conductance (in Ampere/volt)
hfe = 100.0 #Common emitter current gain
hre = 10**-4 #Constant
#Calculation
gm = IC / 25.0 #Transconductance (in Siemen)
rb1e = hfe / gm #Resistance (in ohm)
rbb1 = hie - rb1e #Base spreading resistance (in ohm)
gb1c = hre / rb1e #Feedback conductance (in Siemen)
rce = 1 / (hoe - (1 + hfe)* gb1c) #Output resistance (in ohm)
#Result
print "Value of transconductance is ",gm," per ohm.\nValue of resistance rb1e is ",rb1e," ohm.\nValue of base spreading resistance is ",rbb1," ohm.\nValue of feedback conductance is ",gb1c," per ohm.\nValue of output resistance is ",round(abs(rce * 10**-3))," kilo-ohm."