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
|
{
"metadata": {
"name": "ch1"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter no. 1: Introduction To Electronics"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.1 Page no.8"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Example 1.1\n",
"# a resistor has a coloue band sequence : \n",
"#yellow,voilet,orange and gold.\n",
"#find the Range in which its value lies so as to satisfy manufacturer's Tolerances\n",
"\n",
"#Given\n",
"#Colour Band Sequence: YELLOW, VIOLET, ORANGE, GOLD \n",
"A=4 #NUMERICAL CODE FOR BAND YELLOW\n",
"B=7 #NUMERICAL CODE FOR BAND VIOLET\n",
"C=3 #NUMERICAL CODE FOR BAND ORANGE\n",
"D=5 #TOLERANCE VALUE FOR BAND GOLD i.e. 5%\n",
"\n",
"#Resistor Value Calculation\n",
"R=(A*10+B)*10**C\n",
"#Tolerance Value Calulation\n",
"T=D*R/100;\n",
"R1=R-T;\n",
"R2=R+T;\n",
"\n",
"# Results\n",
"print \"Therefore thr resistance should be within the range \", R1*10**(-3) ,\"kohm\",\"and\", R2*10**(-3),\"kohm\""
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 1.2 Page no.8"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Example 1.2\n",
"#A resistoe has a colour band sequence : gray ,blue.gold and gold.\n",
"#what is the Range in which its value must lie to satisfy manufacturer's Tolerances\n",
"\n",
"#Colour Band Sequence: GRAY, BLUE, GOLD, GOLD\n",
"A=8 #NUMERICAL CODE FOR BAND GRAY\n",
"B=6 #NUMERICAL CODE FOR BAND BLUE\n",
"C=-1 #NUMERICAL CODE FOR BAND GOLD\n",
"D=5 #TOLERANCE VALUE FOR BAND GOLD i.e. 5%\n",
"#Resistor Value Calculation\n",
"R=(A*10+B)*10**C\n",
"#Tolerance Value Calulation\n",
"T=D*R/100\n",
"R1=R-T\n",
"R2=R+T\n",
"# Results \n",
"print \"Range of Values of the Resistor is between \",R1,\"ohm\",\"and\",R2,\"ohm\""
],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|