# 6.1
import math
Vcc=50;
t=10*10**-3;
R=500*10**3;
C=0.2*10**-6;
tc=R*C;
Vo=Vcc*(1-math.exp(-t/tc));
print ("amplitude of voltage after 10 ms=%.2f V" %Vo)
# 6.2
import math
Vcc=4.76;
t=50*10**-6;
R=0.2*10**3;
C=0.2*10**-6;
tc=R*C;
Vo=Vcc*(math.exp(-t/tc));
print ("voltage across the capacitor after 50 microsecond=%.2f V" %Vo)
# 6.3
import math
BW=10*10**6;
tr=0.35/BW*10**6;
print ("Rise time=%.2f us" %tr)
# 6.4
import math
R=(9.0*10**3)+(900+90+10);
Rt=100*10**3;
Attenuation=R/Rt;
Attenuation_factor=1/Attenuation;
print ("Attenuation factor=%.1f " %Attenuation_factor)
# 6.5
import math
R=10.0*10**3;
Ri=100*10**3;
Rt=100*10**3;
Rp=(Ri*R)/(Ri+R);
Attenuation=Rp/Rt;
Attenuation_factor=1/Attenuation;
print ("Attenuation factor=%.1f " %Attenuation_factor)
# 6.6
import math
Vo=50*10**-3;
print ('For point A Attenuation_factor=400')
Attenuation_factor=400;
Vi=Attenuation_factor*Vo;
print ("voltage per division value at point A=%.2f" %Vi)
print ('For point B Attenuation_factor=100')
Attenuation_factor=100;
Vi=Attenuation_factor*Vo;
print ("voltage per division value at point B=%.2f" %Vi)
print ('For point C Attenuation_factor=40')
Attenuation_factor=40;
Vi=Attenuation_factor*Vo;
print ("voltage per division value at point C=%.2f" %Vi)
print ('For point D Attenuation_factor=10')
Attenuation_factor=10;
Vi=Attenuation_factor*Vo;
print ("voltage per division value at point D=%.2f" %Vi)
print ('For point E Attenuation_factor=4')
Attenuation_factor=4;
Vi=Attenuation_factor*Vo;
print ("voltage per division value at point E=%.2f" %Vi)
print ('For point F Attenuation_factor=1')
Attenuation_factor=1;
Vi=Attenuation_factor*Vo;
print ("voltage per division value at point F=%.2f" %Vi)
#6.7
import math
R2=100*10**3;
Vi=1.0;
R1=900*10**3;
Vo_dc=Vi*R2/(R1+R2);
k_dc=1/Vo_dc;
print ("Attenuationn for dc=%.1f" % k_dc)
XC2=1592.0;
Vi=1;
XC1=3183;
Vo_ac=Vi*XC2/(XC1+XC2);
k_ac=1/Vo_ac;
print ("Attenuationn for ac=%.1f" % k_ac)
print ('Therefore the attenuation with ac is different from that of dc')
# 6.8
import math
e=1.6*10**-19;
Ea=800;
m=9.1*10**-31;
Vox=(2*e*Ea/m)**0.5;
print ("maximum velocity of the beam of electrons=%.2f m/s" %Vox)
# 6.9
import math
e=1.6*10**-19;
Ea=2000;
m=9.1*10**-31;
Vox=(2*e*Ea/m)**0.5;
print ("maximum velocity of the beam of electrons=%.2f m/s" %Vox)
L=5;
ld=1.5*10**-2;
d=5*10**-3;
S=(L*ld/2*d*Ea);
print ("deflection sensitivity=%.2f mm/V" %S)
G=1/S;
print ("Deflection Factor=%.2f V/mm" %G)
# 6.10
import math
Ea=2000;
L=0.3;
ld=2*10**-2;
d=5*10**-3;
D=3*10**-2;
Ed=(2*d*Ea*D)/(L*ld);
gain=100;
V_require=Ed/gain;
print ("Input voltage required for deflection of 3mm =%.1f V" %V_require)
# 6.11
import math
e=1.6*10**-19;
Ea=2000;
m=9.1*10**-31;
Vox=(2*e*Ea/m)**0.5;
print ("maximum velocity of the beam of electrons=%.2f m/s" %Vox)
l=50*10**-3;
fc=Vox/(4*l)*10**-6;
print ("Cutt off frequency=%.2f MHz" %fc)