#Variable declaration
T=300; #K
ni=1.5*10**16; #Intrinsic carrier concentartion per m^3
yn=0.13; #Electron mobility in m^2/(V*s)
yp=0.05; #Hole mobility in m^2/(V*s)
e=1.6*10**-19; #Charge of electron in C
#Calculations
Gi=e*ni*(yn+yp); #Intrinsic conductivity
Ri=1/Gi; #Intrinsic resistivity
#Results
print 'Intrinsic conductivity=%.3e S/m'%Gi; #incorrect answer in textbook for Gi
print 'Intrinsic resistivity=%.3e ohm*meter'%Ri;
#Variable declaration
Sn=480; #Conductivity in S/m
yn=0.38; #Electron mobility in m^2/(V*s)
e=1.6*10**-19; #Charge of electron in C
#Calculations
Nd=Sn/(e*yn); #Concentration of donor atoms per m^3
#Result
print 'Concentration of donor atoms = %.1e m^-3'%Nd;
#Variable declaration
T=300; #K
ni=1.5*10**16; #Intrinsic carrier concentartion per m^3
yn=0.13; #Electron mobility in m^2/(V*s)
yp=0.05; #Hole mobility in m^2/(V*s)
e=1.6*10**-19; #Charge of electron in C
l=0.01; #length in m
a=10**-6; #cross sectional area in m^2
#Calculations
Gi=e*ni*(yn+yp); #Intrinsic conductivity
Ri=l/(Gi*a); #Required resistance
#Results
print 'Intrinsic conductivity=%.2e S/m'%Gi;
print 'required resistance = %.2f Mohm'%(Ri*10**-6);
import math
#Variable declaration
z=(100./60);#z=conductiarrier concentration in /(m^3)
ni=2.5*10**(19);#ni=intrinsic conductivity of intrinsic material in S/m
#(P/N)=(1./2);#(P/N)=ratio of hole mobility(P) to electron mobility(N)
e=1.6*(10**-19);#e=charge of electron in Coulomb
#Calculations&Results
N=(z/(e*ni*(1+(1./2))))
print "N=%.4f (m^2)/(V.s)"%N
P=(N/2)
print "P=%.4f (m^2)/(V.s)"%P
#Nd+p=Na+n;n=electron concentration;p=hole concentration
#np=(ni^2)
Nd=(10**20)#Nd=donor concentration in /(m^3)
Na=5*(10**19)#Na=acceptor concentration in /(m^3)
n=(1./2)*((Nd-Na)+math.sqrt(((Nd-Na)**2)+(4*(ni**2))))
print "n=%.3e /(m**3)"%n
p=(ni**2)/n
print "p=%.3e /(m^3)"%p
Z=e*((n*N)+(p*P))#Z=conductivity of doped sample in S/m
print "Z=%.1f S/m"%Z
F=200#F=applied electric field in V/cm
J=Z*F#J=total conduction current density in A/(m^2)
print "J=%.f A/(m^2)"%J
import math
#Variable declaration
ni=2.5*10**(19);#ni=intrinsic conductivity of intrinsic material in S/m
Nd=5*(10**19)#Nd=donor concentration in /(m^3)
#Calculations&Results
n=(1./2)*(Nd+math.sqrt((Nd**2)+(4*(ni**2))))#n=electron concentration
print "n=%.3e /(m^3)"%n
p=(ni**2)/n#p=hole concentration
print "p=%.3e /(m^3)"%p
N=0.38#N=electron mobility in (m^2)/(V.s)
P=0.18#P=hole mobility in (m^2)/(V.s)
e=1.6*(10**-19)#e=electronic charge in Coulomb
Z=e*((n*N)+(p*P))#Z=conductivity of doped sample in S/m
print "Z=%.3f S/m"%Z
#Variable declaration
c=3*(10**8);#c=velocity of light in vacuum in m/s
h=6.6*(10**-34);#h=Planck's constant in J.s
Eg=1.98*1.6*(10**-19)#Eg=band gap in J
#Calculations
#calculating Y=required wavelength
Y=((c*h)/Eg)/(10**-9)
#Result
print "Y=%.f nm"%Y
#Variable declaration
RH=(10**-2);#RH=Hall coefficient in (m^3)/C
VH=(10**-3);#VH=Hall Voltage in V
b=2*(10**-3);#b=width in m
I=(10**-3);#I=current in A
#Calculations&Results
#RH=(VH*b)/(I*B)
B=(VH*b)/(I*RH)#B=magnetic field
print "B= %.1f T"%B
t=(10**-3)#t=thickness in m
FH=(VH/t)#FH=Hall field
print "FH=%.f V/m"%FH