summaryrefslogtreecommitdiff
path: root/1985/CH12/EX12.7/Chapter12_example7.sce
diff options
context:
space:
mode:
Diffstat (limited to '1985/CH12/EX12.7/Chapter12_example7.sce')
-rwxr-xr-x1985/CH12/EX12.7/Chapter12_example7.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/1985/CH12/EX12.7/Chapter12_example7.sce b/1985/CH12/EX12.7/Chapter12_example7.sce
new file mode 100755
index 000000000..c32a46396
--- /dev/null
+++ b/1985/CH12/EX12.7/Chapter12_example7.sce
@@ -0,0 +1,13 @@
+clc
+clear
+//Input data
+lo=3200*10^-10//Threshold wavelength in m
+h=6.625*10^-34//Plancks constant in J.s
+c=3*10^8//Velocity of light in m/s
+e=1.6*10^-19//Charge of electron in Columbs
+
+//Calculations
+W=((h*c)/(lo*e))//Work function of platinum in eV
+
+//Output
+printf('The photoelectric workfunction for platinum is %3.4f eV',W)