summaryrefslogtreecommitdiff
path: root/Modern_Physics_by_K_S_Krane/1-Introduction.ipynb
blob: 6597615dd48bd9ff60c3d2b48f4865522e3eac31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 1: Introduction"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.1: Mass_difference_between_a_proton_and_a_neutron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear    \n",
"clc\n",
"disp('Exa-1.1');\n",
"Mn=1.008665;Mp=1.007276                                     //Given mass of an electron and a proton in terms of u\n",
"Md= Mn-Mp;                                                  //mass difference\n",
"printf('Mass difference in terms of U is %f ',Md);         \n",
"Md=Md*931.50;                                              //converting u into Mev/c^2 by multiplying by 931.5 MeV/c^2\n",
"printf('which equals %.3f Mev/c^2.',Md);"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.2: Total_mass_of_proton_and_electron.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear     \n",
"clc\n",
"disp('Exa-1.2');\n",
"Mp=1.007276 ; Me=5.4858*10^-4; //mass of proton and electron in terms of U\n",
"Mt=Mp+Me;                      //Total mass= sum of above masses   \n",
"printf('The combined mass of an electron and a proton was found out to be %f U.',Mt);"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.3: Value_of_hc.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear     \n",
"clc\n",
"disp('Exa-1.3');\n",
"h=6.621*10^-34 ; c=2.9979*10^8;                  // h is in J/s and c is  in m/s\n",
"hc=h*c*((10^9)/(1.6022*10^-19));               //1e=1.602*10^-19 J and 1 m=10^9 nm\n",
"printf('The value of hc is %f eV.nm\n',hc); \n",
"printf('Rounding off to 4 digits, we obtain %4.f eV.nm.',hc);\n",
"disp('Hence zero at the end is significant.');"
   ]
   }
],
"metadata": {
		  "kernelspec": {
		   "display_name": "Scilab",
		   "language": "scilab",
		   "name": "scilab"
		  },
		  "language_info": {
		   "file_extension": ".sce",
		   "help_links": [
			{
			 "text": "MetaKernel Magics",
			 "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
			}
		   ],
		   "mimetype": "text/x-octave",
		   "name": "scilab",
		   "version": "0.7.1"
		  }
		 },
		 "nbformat": 4,
		 "nbformat_minor": 0
}