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
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 17:DC Circuits"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.1:pg-866"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The number of electrons that pass through bulb is=\n",
"9.375e+17\n",
"electrons\n"
]
}
],
"source": [
"#Example 17_1\n",
" \n",
" \n",
"#To find number of electrons flow through bulb\n",
"current=0.15 #Units in C\n",
"q=1.6*10**-19 #Units in C/electron\n",
"noe=current/q #Units in number of Electrons\n",
"print \"The number of electrons that pass through bulb is=\"\n",
"print noe\n",
"print \"electrons\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.2:pg-867"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The resistance in bulb is= 19.4 Ohms\n"
]
}
],
"source": [
"#Example 17_2\n",
" \n",
" \n",
"#To find the resistance in bulb\n",
"v=1.55 #Units in V\n",
"i=0.08 #Units in A\n",
"r=v/i #Units in Ohms\n",
"print \"The resistance in bulb is=\",round(r,1),\" Ohms\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.3:pg-867"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The resistance in wire is= 0.205 Ohms\n"
]
}
],
"source": [
"#Example 17_3\n",
" \n",
" \n",
"#To find the resistance in wire\n",
"row=1.7*10**-8 #Units in Ohm meter\n",
"l=40 #Units in meters\n",
"a=0.0331*10**-4 #Units in meters**2\n",
"r=(row*l)/a #Units in Ohms\n",
"print \"The resistance in wire is=\",round(r,3),\" Ohms\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.4:pg-868"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The appropriate resistance in wire is Ro= 26.6 Ohms\n"
]
}
],
"source": [
"#Example 17_4\n",
" \n",
" \n",
"#To find the appropriate resistance of the wire\n",
"alpha=0.0045 #Units in Centigrade**-1\n",
"t=1780 #Units in Centigrade\n",
"deltaR=240 #Units in Ohms\n",
"ro=deltaR/(1+(alpha*t)) #Units in ohms\n",
"print \"The appropriate resistance in wire is Ro=\",round(ro,1),\" Ohms\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.5:pg-868"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Heat generated in bulb is= 48000.0 J\n"
]
}
],
"source": [
"#Example 17_5\n",
" \n",
" \n",
"#To find out the amount of heat developed in bulb\n",
"t=20.0*60 #Units in sec\n",
"pow=40.0 #Units in W\n",
"heat=t*pow #Units in J\n",
"print \"Heat generated in bulb is=\",round(heat),\" J\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.6:pg-869"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Cost needed to operate is= 0.035 Dollars\n"
]
}
],
"source": [
"#Example 17_6\n",
" \n",
" \n",
"#To calculate the cost needed to operate\n",
"power=0.7 #Units in KW\n",
"time=0.5 #Units in h\n",
"heat=power*time #Units in K Wh\n",
"cost=0.10 #Units in Dollars\n",
"tcost=cost*heat #Units in Dollars\n",
"print \"Cost needed to operate is=\",round(tcost,4),\" Dollars\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.7:pg-869"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The current in circuit is I= -0.82 A\n"
]
}
],
"source": [
"#Example 17_7\n",
" \n",
" \n",
"#To find the current in circuit\n",
"v1=3 #Units in V\n",
"v2=12.0#Units in V\n",
"r1=5.0 #Units in Ohms\n",
"r2=6 #Units in Ohms\n",
"i=(v1-v2)/(r1+r2) #Units in A\n",
"print \"The current in circuit is I=\",round(i,2),\" A\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.8:pg-870"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Current in wire 1 is I1= 1.75 A\n",
"Current in wire 2 is I2= -0.5 A\n",
"Current in wire 3 is I3= 1.25 A\n",
"\n"
]
}
],
"source": [
"#Example 17_8\n",
" \n",
" \n",
"#To find the current in all wires\n",
"v=9 #Units in V\n",
"r1=18.0 #Units in Ohms\n",
"i2=-v/r1 #Units in A\n",
"v1=6.0 #Units in V\n",
"r2=12.0 #Units in Ohms\n",
"i3=(v+v1)/r2 #Units in A\n",
"i1=i3-i2 #Units in A\n",
"print \"Current in wire 1 is I1=\",round(i1,2),\" A\\nCurrent in wire 2 is I2=\",round(i2,2),\" A\\nCurrent in wire 3 is I3=\",round(i3,2),\" A\\n\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.9:pg-871"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The current I= 2.0 A\n"
]
}
],
"source": [
"#Example 17_9\n",
" \n",
" \n",
"#To find the current I in the battery\n",
"r1=3 #Units in Ohms\n",
"r2=6.0 #Units in Ohms\n",
"rbc=(r1*r2)/(r1+r2)#Units in Ohms\n",
"r3=4#Units in Ohms\n",
"rac=r3+rbc #Units in Ohms\n",
"v=12.0 #Units in V\n",
"i=v/rac #Units in A\n",
"print \"The current I=\",round(i),\" A\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.10:pg-872"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (<ipython-input-10-e97062f38a8b>, line 17)",
"output_type": "error",
"traceback": [
"\u001b[1;36m File \u001b[1;32m\"<ipython-input-10-e97062f38a8b>\"\u001b[1;36m, line \u001b[1;32m17\u001b[0m\n\u001b[1;33m print \"The current in battery is I=\",round( ,2),\" A\",i)\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"#Example 17_10\n",
" \n",
" \n",
"#To find the current in battery\n",
"r1=3 #Units in Ohms\n",
"r2=6 #Units in Ohms\n",
"ra=(r1*r2)/(r1+r2)#Units in Ohms\n",
"r3=2 #Units in Ohms\n",
"r4=4 #Units in Ohms\n",
"rb=r3+r4 #Units in Ohms\n",
"r5=6 #Units in Ohms\n",
"rc=(r5*rb)/(r5+rb) #Units in Ohms\n",
"r6=9 #Units in Ohms\n",
"r=r6+rc #Units in Ohms\n",
"v=6 #Units in V\n",
"i=v/r #Units in Ohms\n",
"print \"The current in battery is I=\",round( ,2),\" A\",i)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.11:pg-872"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Current in wire 1 is I1= 1.2 A\n",
"Current in wire 2 is I2= 0.6 A\n",
"Current in wire 3 is I3= 0.6 A\n",
"\n"
]
}
],
"source": [
"#Example 17_11\n",
" \n",
" \n",
"#To find the current in the wires\n",
"v1=12.0 #Units in V\n",
"r3=20.0 #Units in Ohms\n",
"v2=6 #Units in V\n",
"r2=10.0 #Units in Ohms\n",
"r1=5 #Units in Ohms\n",
"i3=((v1*r3)-(v2*r1))/((r2*r3)+(r1*r3)+(r1*r2)) #Units in A\n",
"i2=((r2*i3)+v2)/r3 #Units in A\n",
"i1=i3+i2 #Units in A\n",
"print \"Current in wire 1 is I1=\",round(i1,1),\" A\\nCurrent in wire 2 is I2=\",round(i2,1),\" A\\nCurrent in wire 3 is I3=\",round(i3,1),\" A\\n\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.12:pg-873"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Current in wire 1 is I1= 0.667 A\n",
"Current in wire 2 is I2= 0.444 A\n",
"Current in wire 3 is I3= -0.222 A\n",
"\n"
]
}
],
"source": [
"#Example 17_12\n",
" \n",
" \n",
"#To find I1, I2 and I3 in the circuit\n",
"v1=40 #Units in V\n",
"r1=10.0 #Units in Ohms\n",
"r2=30.0 #Units in Ohms\n",
"v2=60.0 #Units in V\n",
"r3=15.0 #Units in Ohms\n",
"v3=50 #Units in V\n",
"i1=((-v1*r2)+(-r3*v1)+(60*r3)+(v3*r2))/((r1*r2)+(r2*r3)+(r3*r1)) #Units in A\n",
"i=2 #Units in A\n",
"i2=(i-i1)/3 #Units in A\n",
"i3=i2-i1 #Units in A\n",
"print \"Current in wire 1 is I1=\",round(i1,3),\" A\\nCurrent in wire 2 is I2=\",round(i2,3),\" A\\nCurrent in wire 3 is I3=\",round(i3,3),\" A\\n\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.13:pg-874"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" The current I= 2.5 A\n",
" Resistance is R= 20.0 Ohms\n",
" The value E is= 41.0 V\n"
]
}
],
"source": [
"#Example 17_13\n",
" \n",
" \n",
"#To find the values of e, R and I\n",
"i1=2 #Units in A\n",
"i2=0.5 #Units in A\n",
"i=i1+i2 #Units in A\n",
"v1=6 #Units in V\n",
"v2=16.0 #Units in V\n",
"r=-(v1-v2)/0.5 #Units in Ohms\n",
"v3=25.0 #Units in V\n",
"e=v2+v3 #Units in V\n",
"print \" The current I=\",round(i,1),\" A\\n Resistance is R=\",round(r),\" Ohms\\n The value E is=\",round(e),\" V\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.14:pg-874"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Current in wire 1 is I1= 2.0 A\n",
"Current in wire 2 is I2= 4.0 A\n",
"Current in wire 3 is I3= 2.0 A\n",
"\n",
"The charge on the capacitor is q= 1e-05 C\n"
]
}
],
"source": [
"#Example 17_14\n",
" \n",
" \n",
"#To find the I1,I2,I3 values and charge on the capacitor\n",
"v1=12.0 #Units in V\n",
"r1=6.0 #Units in Ohms\n",
"i1=v1/r1 #Units in A\n",
"v2=4.0 #Units in V\n",
"r2=8.0 #Units in Ohms\n",
"i3=(v1+v2)/r2 #Units in A\n",
"i2=i1+i3 #Units in A\n",
"print \"Current in wire 1 is I1=\",round(i1),\" A\\nCurrent in wire 2 is I2=\",round(i2),\" A\\nCurrent in wire 3 is I3=\",round(i3),\" A\\n\"\n",
"v3=10.0 #Units in V\n",
"vfg=-v3+(r1*i1) #Units in V\n",
"c=5*10**-6 #Units in F\n",
"q=c*vfg #Units in C\n",
"print \"The charge on the capacitor is q=\",round(q,5),\" C\" \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.15:pg-874"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Potential difference between d to c is= 23.8 V\n",
"\n",
"The potential difference between b to a is= 7.8 V\n"
]
}
],
"source": [
"#Example 17_15\n",
" \n",
" \n",
"#To find the terminal potential of each battery\n",
"v=18 #Units in V\n",
"r=9 #Units in Ohms\n",
"i=v/r #Units in A\n",
"r1=0.1 #Units in Ohms\n",
"v1=-i*r1 #Units in V\n",
"v2=24 #Units in V\n",
"v11=v1+v2 #Units in V\n",
"r2=0.9 #Units in Ohms\n",
"v3=i*r2 #Units in V\n",
"v4=6 #Units in V\n",
"v22=v3+v4 #Units in V \n",
"print \"The Potential difference between d to c is=\",round(v11,1),\" V\"\n",
"print \"\\nThe potential difference between b to a is=\",round(v22,1),\" V\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex17.16:pg-875"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The resistance of the recording device is= 1000000.0 Ohms\n"
]
}
],
"source": [
"#Example 17_16\n",
" \n",
" \n",
"#To findout how large a a resistance must the recording device must have\n",
"r1=10000.0 #Units in Ohms\n",
"percent=1.0 #Units in Percentage \n",
"vo=1/(r1*(percent*100)) #Units In terms of Ro\n",
"Ro=1/vo #Units in Ohms\n",
"print \"The resistance of the recording device is=\",round(Ro),\" Ohms\"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|