import math
#initialisation of variables
sg=0.971*10**3 #g/cm^3 specific gravity
w=22.99*1.66*10**-27 # Weight of a sodium atom
#Calculations
n=sg/w
Ef=3.64*10**-19*(n**(2.0/3))
#Results
print("The value of n is %.2f /m^3 x 10^28 " %(n/10**28))
print("The value of Ef is %.2f eV" %(Ef))
import math
#initialisation of variables
E=0.05 #eV
#Calculations
NE=6.82*10**27*(E**(1.0/2))
#Results
print("The value of NE is %.2f X 10^27 /m^3 " %(NE/10**27))
import math
#initialisation of variables
KE=0.26*1.6*10**-19 #j kinetic energy
m=9.18*10**-31
#Calculations
Vav=math.sqrt((2.0*KE)/m)
#Results
print("The value of Vav is %.2f x 10^5" %(Vav/10**5))
import math
#initialisation of variables
ni1=1.5*10**10 #cm^3
T2=873.0 #k
T1=300.0 #k
Eg0=1.0
#Calculations
ni2=math.sqrt((ni1**2)*(T2/T1)*math.exp((1.21/8.625*10**-5)*(-(1/T2)+(1/T1))))
#Results
print("The value of ni2 is %.2f x 10^17 cm^3" %(ni2/10**10))
import math
#initialisation of variables
kT=0.026
Nc=2.89*10**19
Nd=10**16
#Calculations
Ef=kT*(math.log((Nc/Nd),2))
#Results
print("The value of Ef is %.2f eV" %(Ef))
import math
#initialisation of variables
I1=1.0 #mA
Vt=26.0 #mV
tP=10**-6
#Calculations
g=(I1/Vt)
Cd=(g*tP)/2
#Results
print("The value of Cd is %.2f nF" %(Cd*10**9))