summaryrefslogtreecommitdiff
path: root/backup/Modern_Physics_version_backup/Chapter1.ipynb
blob: 30eac463c2b82a8d74d80b66197d30d4805b95ee (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{
 "metadata": {
  "name": "Chapter1"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1:Introduction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.1, Page 12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\n",
      "Mn=1.008665;Mp=1.007276                                     #Given mass of an electron and a proton in terms of u\n",
      "\n",
      "#calculation\n",
      "Md= Mn-Mp;                                                  #mass difference       \n",
      "Md2=Md*931.50;                                              #converting u into Mev/c^2 by multiplying by 931.5 MeV/c^2\n",
      "\n",
      "#result\n",
      "print \"Mass difference in terms of U is\",round(Md,4); \n",
      "print\"which equals in Mev/c^2. :\",round(Md2,3);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mass difference in terms of U is 0.0014\n",
        "which equals in Mev/c^2. : 1.294\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.2, Page 12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\n",
      "Mp=1.007276 ; Me=5.4858*10**-4; #mass of proton and electron in terms of U\n",
      "\n",
      "#calculation\n",
      "Mt=Mp+Me;                      #Total mass= sum of above masses  \n",
      "\n",
      "#result\n",
      "print\"The combined mass of an electron and a proton was found out to be in U.\",round(Mt,3);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The combined mass of an electron and a proton was found out to be in U. 1.008\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.3, Page 13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\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",
      "\n",
      "#result\n",
      "print \"The value of hc in  eV.nm is\",round(hc,4); \n",
      "print 'Hence zero at the end is significant.';\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of hc in  eV.nm is 1238.8651\n",
        "Hence zero at the end is significant.\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}