import math
#Introduction
gm=2*10**-3
rd=2*10**3 #resistance in ohm
C=10**-6 #capacitance in farad
R=10**6 #resistance in ohm
#Calculation
G=-gm*rd #Small signal voltage gain
fc=1/(2*math.pi*C*R) #frequency in Hz
#Result
print'Small signal voltage gain = %d '%G
print'Low frequency cut off = %.2f Hz'%fc
import math
#Introduction
idd=4*10**-3 #current in ampere
vo=8 #voltage
vdd=12 #voltage
#Calculation
Rd=vo*(vdd-idd)**-1
#Result
print'Rd = %.2f kOhm'%Rd #wrong answer in textbook