import math
ND=10**17 #in atoms/cm**3
NA=0.5*10**16 #in atoms/cm**3
Vo=0.7 #in Volts
V=-10.0 #in Volts
ND=ND*10**6 #in atoms/m**3
NA=NA*10**6 #in atoms/m**3
epsilon=8.85*10**-11 #in F/m
e=1.6*10**-19 #coulamb
VB=0.7 #in Volts
W1=math.sqrt(2*epsilon*VB*(1/NA+1/ND)/e) #in m
VB=Vo-V #in Volts
W2=math.sqrt(2*epsilon*VB*(1/NA+1/ND)/e) #in m
print "When no external voltage is applied, Junction width is ",round(W1,8),"m"
print"When external voltage of -10 Volt is applied, Junction width is ",round(W2,7),"m"
CTzero=50 #in pF
VR=8 #in Volt
VK=0.7 #in Volt
n=1/3.0 #for Si
CT=CTzero/((1+VR/VK)**n) #in pF
print"Junction capacitance is",round(CT,2),"pF"
L=12.5*10**-3 #mH inductance
C1=4.0 #pF Capacitance
C2=40.0 #pF Capacitance
Ctmin=(C1*C1)/(C1+C1) #Min value of total Capacitance
Ctmax=(C2*C2)/(C2+C2) #Max value of total Capacitance
Fmax=1/(2*math.pi*math.sqrt(L*Ctmin*10**-12))
Fmin=1/(2*math.pi*math.sqrt(L*Ctmax*10**-12))
print"The tuning range of circuit lies between",round(Fmin/1000,2),"khz and",round(Fmax/1000,0),"Mhz"