summaryrefslogtreecommitdiff
path: root/Basic_Electronics_and_Linear_Circuits/ch1_1.ipynb
blob: aa323b171a6e28c59bc892651bf7f5d4e2ede48e (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:d40864745b0958ff90d45e29ecc4874d2fd0d20b38ed09535ff46977537fd224"
 },
 "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": [
      "#Given\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": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Therefore thr resistance should be within the range  44.65 kohm and 49.35 kohm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.2 Page no.8"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\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": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Range of Values of the Resistor is  between  8.17 ohm and 9.03 ohm\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}