#Variable declaration
n = 5.8*1e28; # Electrons density in electrons per cube meter
rho = 1.58*1e-8; #Resistivity of wire in ohm meter
m = 9.1*1e-31; # Mass of electron
e = 1.6*1e-19; # Charge of electron in coloumb
E = 1e2; # Electric field
#Calculations
t = round((m/(rho*n*e**2))/1e-14);
u = (e*t*10**-14)/m;
v = u*E;
#Results
print 'The relaxation time is ',t,'*10^-14 s'
print 'The mobility of electrons ',round(u/1e-3,2),'*10^-3 m^2/volt sec'
print 'The average drift velocity for an electric field of 1V/cm is ',round(v,3),'m/s'
from math import sqrt
#Variable declaration
e = 1.6*1e-19; # Charge on electron in coulumb
m = 9.1*1e-31; # Mass of electron in kg
rho = 1.54*1e-8; #Resistivity of material at room temperature in ohm . meter
n = 5.8*1e28; # Number of electrons per cubic meter
Ef = 5.5; # The fermi energy of the conductor in eV
#Calculations
vf = sqrt((2*Ef*e)/m);
t = (m/(n*e**2*rho));
MFP = vf*t;
#Results
print 'Velocity of electron is',round(vf/1e6,2),'*10^6 m/s'
print 'Mean free path of electron is',round(MFP/1e-8,2),'*10^-8 m'
#Variable declaration
m = 9.1*1e-31; #Mass of electron in kg
e = 1.6*1e-19; # Charge on electron in coulumb
t = 3*1e-14; # Relaxation time in seconds
n = 5.8*1e28; #Number of electrons in cubic meter
#Calculations
rho =m/(n*t*e*e);#The resistivity of metal
u = 1/(n*e*rho);#The mobility of electron
#Result
print 'The resistivity of metal is',round(rho/1e-8,2),'*10^-8 Ohm.meter' #incorrect answer in textbook
print 'The mobility of electron is',round(u/1e-3,2),'*10^-3 sqaure meter per volt.second'
from math import sqrt
#Variable declaration
e = 1.6*1e-19; # Charge of electrons in coloumbs
m = 9.1*1e-31; # Mass of electrons in Kg
Ef = 7*e ; #Fermi energy in electrons volt
t = 3*1e-14; # Relaxation time in seconds
#Calculations
vf = sqrt(Ef*2/m);
lamda = vf*t;#The mean free path of electrons
#Result
print 'The mean free path of electrons is',round(lamda/1e-10),'A'
#Variable declaration
rhoC = 1.65*1e-8; # Electrical resistivity of cpooer in ohm meter
rhoN = 14*1e-8; # Electrical resistivity of Nickel in ohm meter
T = 300; # Room temperature in kelvin
#Calculations
KCu =(2.45*1e-8*T)/rhoC;#Thermal conductivity of Cu
KNi =2.45*1e-8*T/rhoN;#Thermal conductivity of Ni
#Results
print 'Thermal conductivity of Cu is ',round(KCu),'W/(m*degree)' #incorrect answer in textbook
print 'Thermal conductivity of Ni is ',KNi,'W/(m*degree)'