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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
|
{
"metadata": {
"name": "chapter4s"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": "Chapter 4: Quantum Physics"
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 1, Page No: 4.52"
},
{
"cell_type": "code",
"collapsed": false,
"input": "\nimport math;\n\n# Variable Declaration\nlamda = 3*10**-10; # wavelength of incident photons in m\ntheta = 60; # viewing angle in degrees\nh = 6.625*10**-34 # plancks constant\nmo = 9.11*10**-31 # mass in Kg\nc = 3*10**8; # vel. of light \n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\n\ntheta_r = theta*math.pi/180; # degree to radian conversion\nlamda1 = lamda+( (h/(mo*c))*(1-math.cos(theta_r))) # wavelength of scattered photons\n\n# Result\nprint 'Wavelength of Scattered photons = %3.4f'%(lamda1*10**10),'\u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Wavelength of Scattered photons = 3.0121 \u00c5\n"
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 2, Page No:4.52"
},
{
"cell_type": "code",
"collapsed": false,
"input": "\nimport math;\n\n# Variable declaration\ntheta = 135; # angle in degrees\nh = 6.625*10**-34 # plancks constant\nmo = 9.1*10**-31 # mass in Kg\nc = 3*10**8; # vel. of light in m/s\n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\ntheta_r = theta*math.pi/180; # degree to radian conversion\nc_lamda = ( (h/(mo*c))*(1-math.cos(theta_r))) # Change in wavelength in m\n\n# Result\nprint 'Change in Wavelength = %3.5f' %(c_lamda*10**10),' \u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Change in Wavelength = 0.04143 \u00c5\n"
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 3, Page No:4.53"
},
{
"cell_type": "code",
"collapsed": false,
"input": "\nimport math;\n\n# Variable Declaration\nlamda = 0.1*10**-9; # wavelength of X-rays in m\ntheta = 90; # angle with incident beam in degrees\nh = 6.625*10**-34 # plancks constant\nmo = 9.11*10**-31 # mass in Kg\nc = 3*10**8; # vel. of light \n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\ntheta_r = theta*math.pi/180; # degree to radian conversion\nlamda1 = lamda+( (h/(mo*c))*(1-math.cos(theta_r))) #wavelength of scattered beam\n\n# Result\nprint 'Wavelength of Scattered beam = %3.4f' %(lamda1*10**10),' \u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Wavelength of Scattered beam = 1.0242 \u00c5\n"
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 4, Page No:4.53"
},
{
"cell_type": "code",
"collapsed": false,
"input": "\nimport math;\n\n# Variable Declaration\nh = 6.625*10**-34 # plancks constant\nm = 9.11*10**-31 # mass of electron in Kg\ne = 1.6*10**-19 # charge of electron\nV = 150; # potential difference in volts\n\n# Calculations\n\nlamda = h/(math.sqrt(2*m*e*V)) # de Broglie wavelength\n\n#Result\nprint 'The de-Broglie wavelength = %d' %(lamda*10**10), '\u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "The de-Broglie wavelength = 1 \u00c5\n"
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 5, Page No:4.54"
},
{
"cell_type": "code",
"collapsed": false,
"input": "\nimport math;\n\n# Variable Declaration\nh = 6.625*10**-34 # plancks constant\nm = 9.11*10**-31 # mass of electron in Kg\ne = 1.6*10**-19 # charge of electron\nV = 5000; # potential in volts\n\n# Calculations\n\nlamda = h/(math.sqrt(2*m*e*V)) #de Broglie wavelength\n\n# Result\nprint 'The de-Broglie wavelength of electron = %3.5f' %(lamda*10**10),' \u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "The de-Broglie wavelength of electron = 0.17353 \u00c5\n"
}
],
"prompt_number": 17
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 6, Page No:4.55"
},
{
"cell_type": "code",
"collapsed": false,
"input": "\nimport math;\n\n# Variable Declaration\nE = 100 # Energy of electron in eV\nh = 6.625*10**-34 # plancks constant\nm = 9.11*10**-31 # mass of electron in Kg\ne = 1.6*10**-19 # Charge of electron in Columbs\n\n# Calculations\n\nE1 = E*e # Energy conversion from eV to Joule\nlamda = h/(math.sqrt(2*m*E1)) # de Broglie wavelength\n\n# Result\nprint 'The de-Broglie wavelength = %3.3f' %(lamda*10**10),' \u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "The de-Broglie wavelength = 1.227 \u00c5\n"
}
],
"prompt_number": 21
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 7, Page No:4.55"
},
{
"cell_type": "code",
"collapsed": false,
"input": "\nimport math;\n\n# Variable Declaration\nm = 1.675*10**-27; # Mass of proton in kg\nc = 3*10**8; # velocity of light in m/s\nh = 6.625*10**-34 # plancks constant\n\n# Calculations\n\nvp = c/20; # velocity of proton in m/s\nlamda = h/(m*vp) # de-Broglie wavelength in m\n\n# Result\nprint 'de-Broglie wavelength = %e'%(lamda),'lamda';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "de-Broglie wavelength = 2.636816e-14 lamda\n"
}
],
"prompt_number": 22
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 8, Page No:4.56"
},
{
"cell_type": "code",
"collapsed": false,
"input": "\nimport math;\n\n# Variable declaration\nE = 10000 # Energy of neutron in eV\nh = 6.625*10**-34 # plancks constant\nm = 1.675*10**-27 # mass of neutron in Kg\ne = 1.6*10**-19 \n\n# Calculations\n\nE1 = E*e # Energy conversion from eV to Joule\nlamda = h/(math.sqrt(2*m*E1)) # de Broglie wavelength\n\n# Result\nprint 'The de-Broglie wavelength of neutron = %3.3e' %lamda,' m';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "The de-Broglie wavelength of neutron = 2.862e-13 m\n"
}
],
"prompt_number": 23
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 10, Page No:4.58"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable decalaration\nl = 0.1*10**-9; # side of cubical box\nh = 6.625*10**-34 # plancks constant in Jsec\nm = 9.11*10**-31 # mass of electron in Kg\nKb = 1.38*10**-23 # Boltzmann constant \n\n# Calculations\n# for cubical box the energy eigen value is Enx ny nz = (h^2/(8*m*l^2))*(nx^2 + ny^2 +nz^2)\n# For the next energy level to the lowest energy level nx = 1 , ny = 1 and nz = 2\nnx = 1\nny = 1\nnz = 2\nE112 = (h**2/(8*m*l**2))*( nx**2 + ny**2 + nz**2);\n\n# We know the average energy of molecules of aperfect gas = (3/2)*(Kb*T)\nT = (2*E112)/(3*Kb); # Temperature in kelvin\n\n# Result\nprint 'E112 = %3.4e' %E112,'Joules'',\\n','Temperature of the molecules T = %3.4e' %T, 'K';\n",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "E112 = 3.6134e-17 Joules,\nTemperature of the molecules T = 1.7456e+06 K\n"
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 11, Page No:4.59"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable declaration\nl = 4*10**-9; # width of infinitely deep potential\nh = 6.625*10**-34 # plancks constant in Jsec\nm = 9.11*10**-31 # mass of electron in Kg\nn = 1; # minimum energy\ne = 1.6*10**-19 # charge of electron in columbs\n\n# Calculations\nE = (h**2 * n**2)/(8*m*l**2) # Energy of electron in an infinitely deep potential well \nE1 = E/e #energy conversion from joules to eV\n\n# Result\nprint 'Minimum energy of an electron = %3.4f' %E1,' eV';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Minimum energy of an electron = 0.0235 eV\n"
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 12, Page No:4.61"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable Declaration\nl = 0.1*10**-9; # length of one dimensional box \nh = 6.625*10**-34 # plancks constant in Jsec\nm = 9.11*10**-31 # mass of electron in Kg\nn = 1; # for ground state\nn5 = 6; # n value for fifth excited state\ne = 1.6*10**-19 # charge of electron in columbs\n\n# Calculations\nEg = (h**2 * n**2)/(8*m*l**2 * e ) # Energy in ground state in eV \nEe = (h**2 * n5**2)/(8*m*l**2 * e) # Energy in excited state in eV\nE = Ee - Eg; # energy req to excite electrons from ground state to fifth excited state\n\n# Result\nprint 'Energy required to excite an electron from ground state to fifth excited state = %3.2f' %E, 'eV';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Energy required to excite an electron from ground state to fifth excited state = 1317.38 eV\n"
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 13, Page No:4.62"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable decalration\nl = 0.1*10**-9; # length of one dimensional box \nh = 6.625*10**-34 # plancks constant in Jsec\nm = 9.11*10**-31 # mass of electron in Kg\nn = 1; # for ground state\ne = 1.6*10**-19 # charge of electron in columbs\n\n# Calculations\nE = (h**2 * n**2)/(8*m*l**2 *e ) # Energy of electron in eV \n\n# Result\nprint 'Energy of an electron = %3.3f' %E,' eV';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Energy of an electron = 37.639 eV\n"
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Example 14, Page No:4.63"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable declaration\nl = 0.5*10**-9; # width of one dimensional box in m \nh = 6.625*10**-34 # plancks constant in Jsec\nm = 9.11*10**-31 # mass of electron in Kg\nn = 1; # for ground state\ne = 1.6*10**-19 # charge of electron in columbs\n\n# Calculations\nE = (h**2 * n**2)/(8*m*l**2 *e ) # Energy of electron in eV \n\n# Result\nprint 'Least Energy of an electron = %3.4f' %E,' eV';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Least Energy of an electron = 1.5056 eV\n"
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 1, Page No:4.64"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# variable declaration\nh = 6.625*10**-34 # plancks constant\nc = 3*10**8; # vel. of light\nlamda = 5893*10**-10; # wavelength in m\nP = 100 # power of sodium vapour lamp\n\n# Calculations\nE = (h*c)/lamda; # Energy in joules\nN = P/E # Number of photons emitted\n\n# Result\nprint 'Number of Photons emitted = %3.4e' %N,' per second';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Number of Photons emitted = 2.9650e+20 per second\n"
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 2, Page No:4.64"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable declaration\nlamda1 = 0.022*10**-10; # wavelength of scatterd X-rays in m\ntheta = 45; # scatterring angle in degrees\nh = 6.625*10**-34 # plancks constant\nmo = 9.11*10**-31 # mass in Kg\nc = 3*10**8; # vel. of light \n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\n\ntheta_r = theta*math.pi/180; # degree to radian conversion\nlamda = lamda1-( (h/(mo*c))*(1-math.cos(theta_r))) # incident Wavelength\n\n# Result\nprint 'Wavelength of incident beam = %3.4f' %(lamda*10**10),' \u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Wavelength of incident beam = 0.0149 \u00c5\n"
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 3 , Page No:4.65"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable Declaration\nEi = 1.02*10**6 # photon energy in eV\ntheta = 90; # scattered angle in degrees\nh = 6.625*10**-34 # plancks constant\nmo = 9.1*10**-31 # mass of electron in Kg\ne = 1.6*10**-19 # charge of electron\nc = 3*10**8; # vel. of light in m/s\n\n# Calculations\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\ntheta_r = theta*math.pi/180; # degree to radian conversion\nc_lamda = ( (h/(mo*c))*(1-math.cos(theta_r))) #Change in wavelength in m\ndv = c/c_lamda; # change in frequency of the scattered photon\ndE = (h*dv)/e # change in energy of scattered photon in eV\n# This change in energy is transferred as the KE of the recoil electron\nEr = dE; # Energy of recoil electron\nEs = Ei - Er # Energy of scattered photon\n\n\n# Result\nprint 'Energy of the recoil electron = %3.4f' %(Er*10**-6),' MeV','\\n','Energy of the Scattered photon = %3.4f' %(Es*10**-6),'MeV';\n",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Energy of the recoil electron = 0.5119 MeV \nEnergy of the Scattered photon = 0.5081 MeV\n"
}
],
"prompt_number": 17
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 4, Page No:4.65"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable Declaration\nlamda = 0.124*10**-10; # wavelength of X-rays in m\ntheta = 180; # Scattering angle in degrees\nh = 6.625*10**-34 # plancks constant\nmo = 9.11*10**-31 # mass in Kg\nc = 3*10**8; # vel. of light \n\n# Calculatioms\n# from Compton theory ,Compton shift is given by\n# lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\n\ntheta_r = theta*math.pi/180; # degree to radian conversion\nlamda1 = lamda+( (h/(mo*c))*(1-math.cos(theta_r))) # wavelength of scattered X-rays\n\n# Result\nprint 'Wavelength of Scattered X-rays = %3.4f' %(lamda1*10**10),' \u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Wavelength of Scattered X-rays = 0.1725 \u00c5\n"
}
],
"prompt_number": 20
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 5, Page No:4.65"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable Declaration\nh = 6.625*10**-34 # plancks constant\nm = 9.11*10**-31 # mass of electron in Kg\ne = 1.6*10**-19 # charge of electron\nV = 2000; # potential in volts\n\n# Calculations\n\nlamda = h/(math.sqrt(2*m*e*V)) # de Broglie wavelength\n\n# Result\nprint 'The de-Broglie wavelength of electron = %3.4f' %(lamda*10**10),' \u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "The de-Broglie wavelength of electron = 0.2744 \u00c5\n"
}
],
"prompt_number": 23
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 6, Page No:4.66"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# variable Declaration \nh = 6.625*10**-34 # plancks constant\nm = 1.678*10**-27 # mass of proton in Kg\ne = 1.6*10**-19 # charge of electron\nKb = 1.38*10**-23; # boltzmann constant\nT = 300 # Temperature in kelvin\n\n#Calculations\nlamda = h/(math.sqrt(3*m*Kb*T)) #de Broglie wavelength\n\n#Result\nprint 'The de-Broglie wavelength = %3.4f' %(lamda*10**10),' \u00c5';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "The de-Broglie wavelength = 1.4512 \u00c5\n"
}
],
"prompt_number": 25
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 7, Page No:4.66"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable Declaration\nh = 6.625*10**-34 # plancks constant\nm = 9.11*10**-31 # mass of electron in Kg\nlamda = 3*10**-2; # wavelength of electron wave\ne = 1.6*10**-19; # charge of electron\n\n# Calculations\nE = (h**2)/(2*m*lamda**2); # Energy in Joules\nE1 = E/e;\n\n# Result\nprint 'Energy of the electron E = %3.4e' %E1,'eV';\nprint 'Note: Calculation mistake in textbook'",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Energy of the electron E = 1.6729e-15 eV\nNote: Calculation mistake in textbook\n"
}
],
"prompt_number": 26
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 8, Page No:4.67"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable declaration\nh = 6.625*10**-34 # plancks constant\nm = 9.11*10**-31 # mass of electron in Kg\nc = 3*10**8; # velocity of light in m/s\n\n# Calculations\nve = 0.7071*c # velocity of electron\nlamda = h/(m*ve*math.sqrt(1-(ve/c)**2)) #de Broglie wavelength\n\n# we know Compton wavelength ,lamda' - lamda = (h/(mo*c))*(1-cos\u03b8)\n# maximum shift \u03b8 = 180\ntheta = 180\ntheta1 = theta*math.pi/180;\nd_lamda = (h/(m*c))*(1-math.cos(theta1))\nprint 'de Broglie wavelength = %e' %lamda,' m';\nprint 'compton wavelength = %e' %d_lamda,'m';\nprint 'The de-Broglie wacelength is equal to the compton wavelength';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "de Broglie wavelength = 4.848152e-12 m\ncompton wavelength = 4.848152e-12 m\nThe de-Broglie wacelength is equal to the compton wavelength\n"
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 9, Page no:4.68"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable Declaration\nl = 10**-10; # side of one dimensional box \nh = 6.625*10**-34 # plancks constant in Jsec\nm = 9.11*10**-31 # mass of electron in Kg\nn1 = 1; # for 1st eigen value\nn2 = 2; # for 2nd eigen value\nn3 = 3; # for 3rd eigen value\nn4 = 4; # for 4th eigen value\ne = 1.6*10**-19 # charge of electron in columbs\n\n# Calculations\nE1 = (h**2 * n1**2)/(8*m*l**2 *e ) #first Eigen value\nE2 = (h**2 * n2**2)/(8*m*l**2 *e ) # second Eigen value\nE3 = (h**2 * n3**2)/(8*m*l**2 *e ) # third Eigen value\nE4 = (h**2 * n4**2)/(8*m*l**2 *e ) # fourth Eigen value\n \n# Result\nprint '1st Eigen value = %3.1f' %E1,'eV';\nprint '2nd Eigen value = %3.1f' %E2,'eV';\nprint '3rd Eigen value = %3.1f' %E3,'eV';\nprint '4th Eigen value = %3.1f' %E4,'eV';\n\n",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "1st Eigen value = 37.6 eV\n2nd Eigen value = 150.6 eV\n3rd Eigen value = 338.8 eV\n4th Eigen value = 602.2 eV\n"
}
],
"prompt_number": 36
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 10 , Page No:4.68"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable Declaration\nl = 10**-10 ; # length of one dimensional box in m \nh = 6.625*10**-34 # plancks constant in Jsec\nm = 9.11*10**-31 # mass of electron in Kg\nn = 1; # for ground state\ne = 1.6*10**-19 # charge of electron in columbs\n\n# Calculations\nE = 2*(h**2 * n**2)/(8*m*l**2 *e ) #Energy of system having two electrons\n\n# Result\nprint 'Energy of the system having two electrons = %3.4f' %E,' eV';",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Energy of the system having two electrons = 75.2789 eV\n"
}
],
"prompt_number": 37
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": "Addl_Example 11 , Page No:4.69"
},
{
"cell_type": "code",
"collapsed": false,
"input": "import math;\n\n# Variable Declaration\nb = 40; # angle subtended by final images at eye in degrees\na = 10 # angle subtended by the object at the eye kept at near point in degrees\n\n# Calculations\nb_r = b*math.pi/180; # degree to radian conversion\na_r = a*math.pi/180; # degree to radian conversion\nM = math.tan(b_r)/math.tan(a_r); # magnifying power\n\n#Result\nprint 'Magnifying power = %3.3f' %M;",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": "Magnifying power = 4.759\n"
}
],
"prompt_number": 38
},
{
"cell_type": "code",
"collapsed": false,
"input": "",
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|