summaryrefslogtreecommitdiff
path: root/2453/CH3/EX3.7/3_7.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2453/CH3/EX3.7/3_7.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2453/CH3/EX3.7/3_7.sce')
-rwxr-xr-x2453/CH3/EX3.7/3_7.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/2453/CH3/EX3.7/3_7.sce b/2453/CH3/EX3.7/3_7.sce
new file mode 100755
index 000000000..5854cdb67
--- /dev/null
+++ b/2453/CH3/EX3.7/3_7.sce
@@ -0,0 +1,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