summaryrefslogtreecommitdiff
path: root/Electrical_Circuit_Theory_And_Technology/chapter_10.ipynb
diff options
context:
space:
mode:
authorhardythe12014-07-25 13:33:31 +0530
committerhardythe12014-07-25 13:33:31 +0530
commit1c1ea29e3e213559fef5f928df109b7d17c21f24 (patch)
treea1d38eb039e19d9e84b6e769cec04d59e7179e66 /Electrical_Circuit_Theory_And_Technology/chapter_10.ipynb
parentefb9ead5d9758d5d0bed7a22069320b14f972e40 (diff)
downloadPython-Textbook-Companions-1c1ea29e3e213559fef5f928df109b7d17c21f24.tar.gz
Python-Textbook-Companions-1c1ea29e3e213559fef5f928df109b7d17c21f24.tar.bz2
Python-Textbook-Companions-1c1ea29e3e213559fef5f928df109b7d17c21f24.zip
removing unwanted and adding book
Diffstat (limited to 'Electrical_Circuit_Theory_And_Technology/chapter_10.ipynb')
-rw-r--r--Electrical_Circuit_Theory_And_Technology/chapter_10.ipynb1059
1 files changed, 1059 insertions, 0 deletions
diff --git a/Electrical_Circuit_Theory_And_Technology/chapter_10.ipynb b/Electrical_Circuit_Theory_And_Technology/chapter_10.ipynb
new file mode 100644
index 00000000..443b9513
--- /dev/null
+++ b/Electrical_Circuit_Theory_And_Technology/chapter_10.ipynb
@@ -0,0 +1,1059 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c6970542ad51432c833f98812d08f1e8865158ee25a859a74fb18804672e045b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 10: Electrical measuring instruments and measurements</h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 1, page no. 116</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "Ia = 0.040;# in Amperes\n",
+ "I = 50;# in Amperes\n",
+ "ra = 25;# in ohms\n",
+ "\n",
+ "#calculation:\n",
+ "Is = I - Ia\n",
+ "V = Ia*ra\n",
+ "Rs = V/Is\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n value of the shunt to be connected in parallel = \", round((Rs/1E-3),2),\" mohms\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " value of the shunt to be connected in parallel = 20.02 mohms"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2, page no. 116</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "V = 100;# in volts\n",
+ "I = 0.008;# in Amperes\n",
+ "ra = 10;# in ohms\n",
+ "\n",
+ "#calculation:\n",
+ "Rm = (V/I) - ra\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n value of the multiplier to be connected in series = \", (Rm/1E3),\" kohms\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " value of the multiplier to be connected in series = 12.49 kohms"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3, page no. 119</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "fsd = 200;# in volts\n",
+ "R1 = 250;# in ohms\n",
+ "R2 = 2E6;# in ohms\n",
+ "sensitivity = 10000;# in ohms/V\n",
+ "V = 100; # in volts\n",
+ "\n",
+ "#calculation:\n",
+ "Rv = sensitivity*fsd\n",
+ "Iv = V/Rv\n",
+ "Pv = V*Iv\n",
+ "I1 = V/R1\n",
+ "P1 = V*I1\n",
+ "I2 = V/R2\n",
+ "P2 = V*I2\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n (a)the power dissipated by the voltmeter = \", (Pv/1E-3),\" mW\\n\"\n",
+ "print \"\\n (b)the power dissipated by resistor 250 ohm = \", P1,\" W\\n\"\n",
+ "print \"\\n (c)the power dissipated by resistor 2 Mohm = \", (P2/1E-3),\" mW\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " (a)the power dissipated by the voltmeter = 5.0 mW\n",
+ "\n",
+ "\n",
+ " (b)the power dissipated by resistor 250 ohm = 40.0 W\n",
+ "\n",
+ "\n",
+ " (c)the power dissipated by resistor 2 Mohm = 5.0 mW"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4, page no. 119</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "V = 10;# in volts\n",
+ "fsd = 0.1;# in Amperes\n",
+ "ra = 50;# in ohms\n",
+ "R = 500;# in ohms\n",
+ "\n",
+ "#calculation:\n",
+ "Ie = V/R\n",
+ "Ia = V/(R + ra)\n",
+ "Pa = Ia*Ia*ra\n",
+ "PR = Ia*Ia*R\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n (a)expected ammeter reading = \", (Ie/1E-3),\" mA\\n\"\n",
+ "print \"\\n (b)Actual ammeter reading = \",round((Ia/1E-3),2),\" mA\\n\"\n",
+ "print \"\\n (c)Power dissipated in the ammeter = \",round((Pa/1E-3),2),\" mW\\n\"\n",
+ "print \"\\n (d)Power dissipated in the load resistor = \", round((PR/1E-3),2),\" mW\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " (a)expected ammeter reading = 20.0 mA\n",
+ "\n",
+ "\n",
+ " (b)Actual ammeter reading = 18.18 mA\n",
+ "\n",
+ "\n",
+ " (c)Power dissipated in the ammeter = 16.53 mW\n",
+ "\n",
+ "\n",
+ " (d)Power dissipated in the load resistor = 165.29 mW"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5, page no. 120</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "fsd = 100;# in volts\n",
+ "R1 = 40E3;# in ohms\n",
+ "R2 = 60E3;# in ohms\n",
+ "sensitivity = 1600;# in ohms/V\n",
+ "\n",
+ "#calculation:\n",
+ "V1 = (R1/(R1 + R2))*fsd\n",
+ "Rv = fsd*sensitivity\n",
+ "Rep = R1*Rv/(R1 + Rv)\n",
+ "V1n = (Rep/(Rep + R2))*fsd\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n (a)the value of voltage V1 with the voltmeter6 not connected = \", V1,\" V\\n\"\n",
+ "print \"\\n (b)the voltage indicated by the voltmeter when connected between A and B = \",round(V1n,2),\" V\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " (a)the value of voltage V1 with the voltmeter6 not connected = 40.0 V\n",
+ "\n",
+ "\n",
+ " (b)the voltage indicated by the voltmeter when connected between A and B = 34.78 V"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6, page no. 120</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "I = 20;# in amperes\n",
+ "R = 2;# in ohms\n",
+ "Rw = 0.01;# in ohms\n",
+ "\n",
+ "#calculation:\n",
+ "PR = I*I*R\n",
+ "Rt = R + Rw\n",
+ "Pw = I*I*Rt\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n (a)the power dissipated in the load = \", PR,\" W\\n\"\n",
+ "print \"\\n (b)the wattmeter reading. = \",Pw,\" W\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " (a)the power dissipated in the load = 800 W\n",
+ "\n",
+ "\n",
+ " (b)the wattmeter reading. = 804.0 W"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8, page no. 122</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "tc = 100E-6;# in s/cm\n",
+ "Vc = 20;# in V/cm\n",
+ "w = 5.2;# in cm ( width of one complete cycle )\n",
+ "h = 3.6; # in cm ( peak-to-peak height of the display )\n",
+ "\n",
+ "#calculation:\n",
+ "T = w*tc\n",
+ "f = 1/T\n",
+ "ptpv = h*Vc\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n (a)the periodic time, T = \", (T/1E-3),\" msec\\n\"\n",
+ "print \"\\n (b)Frequency, f = \",round(f,2),\" Hz\\n\"\n",
+ "print \"\\n (c)the peak-to-peak voltage = \",ptpv,\" V\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " (a)the periodic time, T = 0.52 msec\n",
+ "\n",
+ "\n",
+ " (b)Frequency, f = 1923.08 Hz\n",
+ "\n",
+ "\n",
+ " (c)the peak-to-peak voltage = 72.0 V"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9, page no. 123</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "tc = 50E-3;# in s/cm\n",
+ "Vc = 0.2;# in V/cm\n",
+ "w = 3.5;# in cm ( width of one complete cycle )\n",
+ "h = 3.4; # in cm ( peak-to-peak height of the display )\n",
+ "\n",
+ "#calculation:\n",
+ "T = w*tc\n",
+ "f = 1/T\n",
+ "ptpv = h*Vc\n",
+ "\n",
+ "#Results \n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n (a)the periodic time, T = \", (T/1E-3),\" msec\\n\"\n",
+ "print \"\\n (b)Frequency, f = \",round(f,2),\" Hz\\n\"\n",
+ "print \"\\n (c)the peak-to-peak voltage = \",ptpv,\" V\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " (a)the periodic time, T = 175.0 msec\n",
+ "\n",
+ "\n",
+ " (b)Frequency, f = 5.71 Hz\n",
+ "\n",
+ "\n",
+ " (c)the peak-to-peak voltage = 0.68 V"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10, page no. 123</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "tc = 500E-6;# in s/cm\n",
+ "Vc = 5;# in V/cm\n",
+ "w = 4;# in cm ( width of one complete cycle )\n",
+ "h = 5; # in cm ( peak-to-peak height of the display )\n",
+ "\n",
+ "#calculation:\n",
+ "T = w*tc\n",
+ "f = 1/T\n",
+ "ptpv = h*Vc\n",
+ "Amp = ptpv/2\n",
+ "Vrms = Amp/(2**0.5)\n",
+ "\n",
+ "#Results \n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n (a)Frequency, f = \",f,\" Hz\\n\"\n",
+ "print \"\\n (b)the peak-to-peak voltage = \",ptpv,\" V\\n\"\n",
+ "print \"\\n (c)Amplitude = \",Amp,\" V\\n\"\n",
+ "print \"\\n (d)r.m.s voltage = \",round(Vrms,2),\" V\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " (a)Frequency, f = 500.0 Hz\n",
+ "\n",
+ "\n",
+ " (b)the peak-to-peak voltage = 25 V\n",
+ "\n",
+ "\n",
+ " (c)Amplitude = 12.5 V\n",
+ "\n",
+ "\n",
+ " (d)r.m.s voltage = 8.84 V"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11, page no. 123</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "#initializing the variables:\n",
+ "tc = 100E-6;# in s/cm\n",
+ "Vc = 2;# in V/cm\n",
+ "w = 5;# in cm ( width of one complete cycle for both waveform )\n",
+ "h1 = 2; # in cm ( peak-to-peak height of the display )\n",
+ "h2 = 2.5; # in cm ( peak-to-peak height of the display\n",
+ "\n",
+ "#calculation:\n",
+ "T = w*tc\n",
+ "f = 1/T\n",
+ "ptpv1 = h1*Vc\n",
+ "Vrms1 = ptpv1/(2**0.5)\n",
+ "ptpv2 = h2*Vc\n",
+ "Vrms2 = ptpv2/(2**0.5)\n",
+ "phi = 0.5*360/w\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n (a)Frequency, f = \",f,\" Hz\\n\"\n",
+ "print \"\\n (b1)r.m.s voltage of 1st waveform = \",round(Vrms1,2),\" V\\n\"\n",
+ "print \"\\n (b2)r.m.s voltage of 2nd waveform = \",round(Vrms2,2),\" V\\n\"\n",
+ "print \"\\n (c)Phase difference = \",phi,\"deg\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " (a)Frequency, f = 2000.0 Hz\n",
+ "\n",
+ "\n",
+ " (b1)r.m.s voltage of 1st waveform = 2.83 V\n",
+ "\n",
+ "\n",
+ " (b2)r.m.s voltage of 2nd waveform = 3.54 V\n",
+ "\n",
+ "\n",
+ " (c)Phase difference = 36.0 deg"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12, page no. 127</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "rP1 = 3;# ratio of two powers\n",
+ "rP2 = 20;# ratio of two powers\n",
+ "rP3 = 400;# ratio of two powers\n",
+ "rP4 = 1/20;# ratio of two powers\n",
+ "\n",
+ "#calculation:\n",
+ "X1 = 10*(1/2.303)*math.log(3)\n",
+ "X2 = 10*(1/2.303)*math.log(20)\n",
+ "X3 = 10*(1/2.303)*math.log(400)\n",
+ "X4 = 10*(1/2.303)*math.log(1/20)\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n (a)decibel power ratio for power ratio 3 = \",round(X1,2),\" dB\\n\"\n",
+ "print \"\\n (b)decibel power ratio for power ratio 20 = \",round(X2,2),\" dB\\n\"\n",
+ "print \"\\n (c)decibel power ratio for power ratio 400 = \",round(X3,2),\" dB\\n\"\n",
+ "print \"\\n (d)decibel power ratio for power ratio 1/20 = \",round(X4,2),\" dB\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " (a)decibel power ratio for power ratio 3 = 4.77 dB\n",
+ "\n",
+ "\n",
+ " (b)decibel power ratio for power ratio 20 = 13.01 dB\n",
+ "\n",
+ "\n",
+ " (c)decibel power ratio for power ratio 400 = 26.02 dB\n",
+ "\n",
+ "\n",
+ " (d)decibel power ratio for power ratio 1/20 = -13.01 dB"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13, page no. 127</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "I2 = 0.020;# in ampere\n",
+ "I1 = 0.005;# in ampere\n",
+ "\n",
+ "#calculation:\n",
+ "X = 20*math.log10(math.e)*math.log(I2/I1)\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n decibel current ratio = \",round(X,2),\" dB\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " decibel current ratio = 12.04 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14, page no. 128</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "rP = 0.06;# power ratios rP = P2/P1\n",
+ "\n",
+ "#calculation:\n",
+ "X = 10*math.log10(math.e)*math.log(rP)\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n decibel Power ratios = \",round(X,2),\" dB\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " decibel Power ratios = -12.22 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 15, page no. 128</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "X = 14;# decibal power ratio in dB\n",
+ "P1 = 0.008;# in Watt\n",
+ "\n",
+ "#calculation:\n",
+ "rP = 10**(X/10)\n",
+ "P2 = rP*P1\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n output power P2 = \",round(P2,2),\" W\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " output power P2 = 0.2 W"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 16, page no. 128</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "X = 27;# Voltage gain in decibels\n",
+ "V2 = 4;# output voltage in Volts\n",
+ "\n",
+ "#calculation:\n",
+ "V1 = V2/(10**(27/20))\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n input Voltage V1 = \",round(V1,2),\" V\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " input Voltage V1 = 0.18 V"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 17, page no. 129</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "R2 = 100;# in ohms\n",
+ "R3 = 400;# in ohms\n",
+ "R4 = 10;# in ohms\n",
+ "\n",
+ "#calculation:\n",
+ "R1 = R2*R3/R4\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n unknown resistance, R1 = \",R1,\" Ohms\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " unknown resistance, R1 = 4000.0 Ohms"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 18, page no. 130</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "E1 = 1.0186;# in Volts\n",
+ "l1 = 0.400;# in m\n",
+ "l2 = 0.650;# in m\n",
+ "\n",
+ "#calculation:\n",
+ "E2 = (l2/l1)*E1\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n the e.m.f. of a dry cell = \",round(E2,2),\" Volts\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " the e.m.f. of a dry cell = 1.66 Volts"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 19, page no. 132</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "I = 0.0025;# in Amperes\n",
+ "R = 5000;# in ohms\n",
+ "e1 = 0.4;# in %\n",
+ "e2 = 0.5;# in %\n",
+ "\n",
+ "#calculation:\n",
+ "V = I*R\n",
+ "em = e1 + e2\n",
+ "Ve = em*V/100\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n voltage V = \",V,\"V(+-)\",Ve,\"V\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " voltage V = 12.5 V(+-) 0.1125 V"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 20, page no. 132</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "I = 6.25;# in Amperes\n",
+ "Im = 10;# max in Amperes\n",
+ "V = 36.5;# in volts\n",
+ "Vm = 50;# max in volts\n",
+ "e = 2;# in %\n",
+ "\n",
+ "#calculation:\n",
+ "R = V/I\n",
+ "Ve = e*Vm/100 \n",
+ "Ve1 = Ve*100/V# in %\n",
+ "Ie = e*Im/100\n",
+ "Ie1 = Ie*100/I# in %\n",
+ "em = Ve1 + Ie1\n",
+ "Re = em*R/100\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n Resistance R = \",R,\" ohms(+-)\",Re,\" ohms\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " Resistance R = 5.84 ohms(+-) 0.34688 ohms"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 21, page no. 133</h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from __future__ import division\n",
+ "import math\n",
+ "#initializing the variables:\n",
+ "R1 = 1000;# in ohms\n",
+ "R2 = 100;# in ohms\n",
+ "R3 = 432.5;# in ohms\n",
+ "e1 = 1;# in %\n",
+ "e2 = 0.5;# in %\n",
+ "e3 = 0.2;# in %\n",
+ "\n",
+ "#calculation:\n",
+ "Rx = R2*R3/R1\n",
+ "em = e1 + e2 + e3\n",
+ "Re = em*Rx/100\n",
+ "\n",
+ "#Results\n",
+ "print \"\\n\\n Result \\n\\n\"\n",
+ "print \"\\n Resistance R = \",Rx,\" ohms(+-)\",Re,\" ohms\\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ " Result \n",
+ "\n",
+ "\n",
+ "\n",
+ " Resistance R = 43.25 ohms(+-) 0.73525 ohms"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file