summaryrefslogtreecommitdiff
path: root/2453/CH3/EX3.7/3_7.sce
blob: 5854cdb67d5011ce46501efdad44ee4b27579484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//To calculate the energy of electron
n1 = 1;
n2 = 1;
n3 = 2;      //for level next to the lowest
e = 1.6*10^-19;
h = 6.62*10^-34;      //planck's constant
m = 9.1*10^-31;      //mass of electron, kg
L = 0.1;     //side of box, nm
L = L*10^-9;    //side of box, m
E1 = h^2*(n1^2+n2^2+n3^2)/(8*m*L^2);      //lowest energy, J
E1 = E1/e;      //lowest energy, eV
printf("energy of electron is %5.2f eV",E1);

//answer given in the book is wrong in the 2nd decimal