##Ex:8.1
import math
V_out=2.;
V_in=400.*10**-6;
A_v=V_out/V_in;
A_v_dB=math.ceil (20.*(math.log (A_v)/math.log (10.)));
print'%s %.2f %s'%("open loop voltage gain = ",A_v_dB," dB");
##Ex:8.2
import math
V_in=5.*10**-3;
R_in=2.*10**6;
I_in=V_in/R_in;
print'%s %.2e %s'%("Input current = ",I_in," A");
##Ex:8.3
import math
V_out=10.;
t=4.;
SR=V_out/t;
print'%s %.2f %s'%("Slew rate = ",SR," V/us");
##Ex:8.4
import math
V_out=2.;
SR=15.;##in V/us
t=V_out/SR;
print'%s %.2f %s'%("Time taken = ",t," us");
##Ex:8.6
import math
R_in=10000.;
f1=250.;
f2=15000.;
C_in=0.159/(f1*R_in);
C_f=0.159/(f2*R_in);
print'%s %.2e %s'%("C_f = ",C_f," F");