summaryrefslogtreecommitdiff
path: root/3710/CH2/EX2.2/Ex2_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '3710/CH2/EX2.2/Ex2_2.sce')
-rw-r--r--3710/CH2/EX2.2/Ex2_2.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/3710/CH2/EX2.2/Ex2_2.sce b/3710/CH2/EX2.2/Ex2_2.sce
new file mode 100644
index 000000000..eee85982f
--- /dev/null
+++ b/3710/CH2/EX2.2/Ex2_2.sce
@@ -0,0 +1,14 @@
+//Example 2.2, Page Number 55
+//The Function fpround(dependency) is used to round a floating point number x to n decimal places
+//Excitation Energy Calculation
+clc;
+
+r=11.8 //Relative Permeability
+m=9.1*(10**-31) //Mass of electron in kilogram
+me=0.26*m //Effective mass
+
+//From equation 2.28
+E=13.6*(me/m)*((1/r)**2) //E is the excitation energy in eV
+E=fpround(E,4)
+
+mprintf("The Excitation Energy is given by %.3feV",E)