In [1]:

```
from math import *
# Given
t = 0 # temperature in K
E = 10 # Fermi energy of electron in eV
e = 1.6e-19 # charge on an electron in C
m = 9.1e-31 # mass of electron in kg
#Calculations
E_ = E * 3 / 5
v = sqrt(2 * E_ * e / m)
#Result
print "\nAverage energy of electron is %.f eV\nSpeed of electron is %.2e m/sec"%(E_,v)
```

In [2]:

```
from math import *
# Given
t = 0 # temperature in K
E = 7.9 # Fermi energy in eV
e = 1.6e-19 # charge on an electron in C
m = 9.1e-31 # mass of electron in kg
#Calculations
E_ = E * 3 / 5
v = sqrt(2 * E_ * e / m)
#Result
print "Average energy of electron is %.2f eV\nSpeed of electron is %.2e m/sec"%(E_,v)
```

In [3]:

```
from math import *
# Given
n = 2.5e28 # no. of free electron in per meter cube
e = 1.6e-19 # charge on an electron in C
m = 9.1e-31 # mass of electron in kg
h = 6.62e-34 # Planck constant in J-sec
#Calculations
E = (h**2 / (8 * pi**2 * m)) * (3 * pi**2 * n)**(2./3) * (1. / e)
v = (h / (2 * pi * m)) * (3 * pi**2 * n)**(1./3)
#Results
print "Fermi energy is %.2f eV\nSpeed of electron is %.2e m/sec"%(E,v)
```

In [4]:

```
from math import *
# Given
d = 8940 # density of copper in kg/m^3
w = 63.55 # atomic weight of copper
t = 0 # temperature in K
N = 6.02e26 # Avogadro no. in per kg
m = 9.1e-31 # mass of electron in kg
h = 6.62e-34 # Planck constant in J-sec
e = 1.6e-19 # charge on an electron in C
#Calculations
V = w / d
n = N / V
E = (h**2 / (8 * pi**2 * m)) * (3 * pi**2 * n)**(2./3) * (1. / e)
E_ = 3 * E / 5
#Results
print "Fermi energy is %.3f eV\nAverage energy is %.2f eV"%(E,E_)
```

In [5]:

```
from math import *
# Given
d = 10.5e6 # density of silver in g/m^3
w = 108 # atomic weight of silver
t = 0 # temperature in K
N = 6.02e23 # Avogadro no. in per kg
m = 9.1e-31 # mass of electron in kg
h = 6.62e-34 # Planck constant in J-sec
e = 1.6e-19 # charge on an electron in C
#Calculations
V = w / d
n = N / V
E = (h**2 / (8 * pi**2 * m)) * (3 * pi**2 * n)**(2./3) * (1 / e)
#Result
print "Fermi energy is %.1f eV"%E
```

In [6]:

```
from math import *
# Given
a = 4e-10 # lattice constant in mr
t = 0 # temperature in K
N = 6.02e23 # Avogadro no. in per kg
m = 9.1e-31 # mass of electron in kg
h = 6.62e-34 # Planck constant in J-sec
e = 1.6e-19 # charge on an electron in C
#Calculations
V = a**3
n = 4 / V
E = (h**2 / (8 * pi**2 * m)) * (3 * pi**2 * n)**(2./3) * (1 / e)
k = (3 * pi**2 *n)**(1./3)
KE = (3 * E / 5) * (n)
#Results
print "Fermi energy is %.2f eV\nFermi vector is %.2e per m\nTotal kinetic energy is %.2e eV"%(E,k,KE)
```

In [7]:

```
from math import pi
# Given
d = 0.9e-3 # diameter of aluminium in m
i = 6 # current in amp
n = 4.5e28 # no. of electron available for conduction per meter^3
e = 1.6e-19 # charge on an electron in C
#Calculations
J = i * 4 / (pi * (d)**2)
v = J / (n * e)
#Result
print "Drift velocity of electron is %.3e m/sec"%v
```

In [8]:

```
from math import *
# Given
d = 8.92e3 # density of copper in kg/m^3
i = 5 # current in amp
w = 63.5 # atomic weight of copper
r = 0.7e-3 # radius in meter
N = 6.02e28 # Avogadro no.
e = 1.6e-19 # charge on an electron in C
#Calculations
V = (w / d)
n = N / V
J = i / (pi * r**2)
v = J / (n * e)
#Result
print "Current density = %.2e amp/m^2\nDrift velocity is %.1e m/sec"%(J,v)
#Incorrect units in the textbook
```

In [9]:

```
from math import *
# Given
d1= 0.534*10**3 # densiy of Li in kg/m^3
d2= 0.971*10**3 # densiy of Na in kg/m^3
d3= 0.86*10**3 # densiy of K in kg/m^3
w1 = 6.939 # atomic weight of Li
w2 = 22.99 # atomic weight of Na
w3 = 39.202 # atomic weight of K
h = 6.62e-34 # Planck constant in J sec
m = 9.1e-31 # mass of an electron in kg
NA = 6.023e26 # Avogadro no.
e = 1.6e-19 # charge on an electron in C
#Calculations
# For Li
n1 = NA * d1/w1
E1 = h**2/(8*pi**2*m)*(3*pi**2*n1)**(2./3)
# For Na
n2 = NA * d2/w2
E2 = h**2/(8*pi**2*m)*(3*pi**2*n2)**(2./3)
# For K
n3 = NA * d3/w3
E3 = h**2/(8*pi**2*m)*(3*pi**2*n3)**(2./3)
#Results
print "Fermi Energy \nFor Li is %.2f eV\nFor Na is %.3f eV \nFor K is %.3f eV"%(E1/e,E2/e,E3/e)
```

In [10]:

```
# Given
l = 1e-10 #length of box in m
e = 1.6e-19 # charge on an electron in C
m = 9.1e-31 # mass of electron in kg
h = 6.62e-34 # Planck constant in J-sec
#Calculations
n = 1 # for n=1
E = (n**2 * h**2) / (8 * m * l**2)
n = 2 # for n=2
E_ = (n**2 * h**2) / (8 * m * l**2)
d = (E_ - E) * (1 / e)
#Result
print "Energy difference is %.2f eV"%d
```