{
 "metadata": {
  "name": "",
  "signature": "sha256:71ce76d6b0eac06e2f6805ff014d728113603c794f739fe4a09502555869f752"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h1>Chapter 5: Series and parallel\n",
      "networks</h1>"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 1, page no. 43</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "#initializing the variables:\n",
      "V1 = 5; # in volts\n",
      "V2 = 2; # in volts\n",
      "V3 = 6; # in volts\n",
      "I = 4; # in Amperes\n",
      "\n",
      "#calculation:\n",
      "Vt = V1 + V2 + V3\n",
      "Rt = Vt/I\n",
      "R1 = V1/I\n",
      "R2 = V2/I\n",
      "R3 = V3/I\n",
      "\n",
      "#results\n",
      "print \"(a) Total Voltage\", Vt,\"Volts(V)\"\n",
      "print \"(b)Total Resistance\", Rt,\"Ohms\"\n",
      "print \"(c)Resistance(R1)\", R1,\"Ohms; Resistance(R2)\", R2,\"Ohms and\"\n",
      "print \"Resistance(R3)\", R3,\"Ohms\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Total Voltage 13 Volts(V)\n",
        "(b)Total Resistance 3.25 Ohms\n",
        "(c)Resistance(R1) 1.25 Ohms; Resistance(R2) 0.5 Ohms and\n",
        "Resistance(R3) 1.5 Ohms"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 2, page no. 43</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "#initializing the variables:\n",
      "V1 = 10; # in volts\n",
      "V2 = 4; # in volts\n",
      "Vt = 25; # in volts\n",
      "Rt = 100; # in ohms\n",
      "\n",
      "#calculation:\n",
      "V3 = Vt - V1 - V2\n",
      "I = Vt/Rt\n",
      "R2 = V2/I\n",
      "\n",
      "#results\n",
      "print \"(a)Voltage(V3)\", V3,\"Volts(V)\"\n",
      "print \"(b)current\", I,\"Amperes(A)\"\n",
      "print \"(c)Resistance(R2)\", R2,\"Ohms\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Voltage(V3) 11 Volts(V)\n",
        "(b)current 0.25 Amperes(A)\n",
        "(c)Resistance(R2) 16.0 Ohms"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 3, page no. 44</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "#initializing the variables:\n",
      "Vt = 12; # in volts\n",
      "R1 = 4; # in ohms\n",
      "R2 = 9; # in ohms\n",
      "R3 = 11; # in ohms\n",
      "\n",
      "#calculation:\n",
      "Rt = R1 + R2 + R3\n",
      "I = Vt/Rt\n",
      "V9 = I*R2\n",
      "P11 = I*I*R3\n",
      "#results\n",
      "print \"a)current\", I,\"Amperes(A)\\n\"\n",
      "print \"b)Voltage(V2)\", V9,\"Volts(V)\\n\"\n",
      "print \"c)Power\", P11,\"Watt(W)\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)current 0.5 Amperes(A)\n",
        "\n",
        "b)Voltage(V2) 4.5 Volts(V)\n",
        "\n",
        "c)Power 2.75 Watt(W)"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 4, page no. 44</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "#initializing the variables:\n",
      "Vt = 50; # in volts\n",
      "R1 = 4; # in ohms\n",
      "R2 = 6; # in ohms\n",
      "\n",
      "#calculation:\n",
      "Rt = R1 + R2\n",
      "I = Vt/Rt\n",
      "V2 = I*R2\n",
      "\n",
      "#results\n",
      "print \"Voltage(V)\", V2,\"Volts(V)\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Voltage(V) 30.0 Volts(V)"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5, page no. 45</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "#initializing the variables:\n",
      "Vt = 24; # in volts\n",
      "R1 = 2; # in ohms\n",
      "I = 3; # in Amperes\n",
      "t = 50; # in hrs\n",
      "\n",
      "#calculation:\n",
      "V1 = I*R1\n",
      "R2 = (Vt-(I*R1))/I\n",
      "E = Vt*I*t\n",
      "\n",
      "#results\n",
      "print \"a)Voltage(V1)\", V1,\"Volts(V)\\n\"\n",
      "print \"b)Resistance(R2)\", R2,\"Ohms\\n\"\n",
      "print \"c)Energy(E)\", E/1000,\"kWh\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)Voltage(V1) 6 Volts(V)\n",
        "\n",
        "b)Resistance(R2) 6.0 Ohms\n",
        "\n",
        "c)Energy(E) 3.6 kWh"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 6, page no. 46</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "#initializing the variables:\n",
      "R1 = 5; # in ohms\n",
      "R3 = 20; # in ohms\n",
      "I1 = 8; # in Amperes\n",
      "It = 11; # in Amperes\n",
      "\n",
      "#calculation:\n",
      "Vt = I1*R1\n",
      "I3 = Vt/R3\n",
      "R2 = Vt/(It - I1 - I3)\n",
      "\n",
      "#results\n",
      "print \"a)Ammeter Reading\", I3,\"Amperes(A)\\n\"\n",
      "print \"b)Resistance(R2)\", R2,\"Ohms\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)Ammeter Reading 2.0 Amperes(A)\n",
        "\n",
        "b)Resistance(R2) 40.0 Ohms"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 7, page no. 46</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "#initializing the variables:\n",
      "R1 = 3; # in ohms\n",
      "R2 = 6; # in ohms\n",
      "Vt = 12; # in volts\n",
      "\n",
      "#calculation:\n",
      "Rt = R1*R2/(R1 + R2)\n",
      "I1 = (Vt/R1)\n",
      "\n",
      "#Result\n",
      "print \"(a)Total Resistance\", Rt,\"Ohms\\n\"\n",
      "print \"(b)Current(I1)\", I1,\"Amperes(A)\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Total Resistance 2.0 Ohms\n",
        "\n",
        "(b)Current(I1) 4.0 Amperes(A)"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 8, page no. 47</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "#initializing  the  variables:\n",
      "R1  =  10;#  in  ohms\n",
      "R2  =  20;#  in  ohms\n",
      "R3  =  60;#  in  ohms\n",
      "I2  =  3;#  in  Amperes\n",
      "\n",
      "#calculation:\n",
      "Vt  =  I2*R2\n",
      "I1  =  Vt/R1\n",
      "I3  =  Vt/R3\n",
      "I  =  I1  +I2  +  I3\n",
      "\n",
      "print  \"\\nResult\\n\"\n",
      "print  \"\\n(a)Voltage(V)  \",Vt,\"  Volts(V)\\n\"\n",
      "print  \"\\n(b)Total  Current(I)  \",I,\"  Amperes(A)\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Result\n",
        "\n",
        "\n",
        "(a)Voltage(V)   60   Volts(V)\n",
        "\n",
        "\n",
        "(b)Total  Current(I)   10.0   Amperes(A)"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 9, page no. 47</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "#initializing  the  variables:\n",
      "R  =  1;#  in  ohms\n",
      "\n",
      "#calculation\n",
      "R1  =  1/(1/R + 1/R + 1/R + 1/R)\n",
      "R2  =  2*R*2*R/(4*R)\n",
      "R3  =  1/(1/R + 1/R + 1/R) + 1\n",
      "R4  =  R*R/(2*R) + 2*R\n",
      "\n",
      "print  \"\\n\\nResult\\n\\n\"\n",
      "print  \"\\n(a)All four in parallel for \",R1,\"  ohm\\n\"\n",
      "print  \"\\n(b)Two in series, in parallel with another two in series for\",R2,\"  ohm\\n\"\n",
      "print  \"\\n(c)Three in parallel, in series with one for \",round(R3,2),\"  ohm\\n\"\n",
      "print  \"\\n(d)Two in parallel, in series with two in series for \",R4,\"  ohm\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "Result\n",
        "\n",
        "\n",
        "\n",
        "(a)All four in parallel for  0.25   ohm\n",
        "\n",
        "\n",
        "(b)Two in series, in parallel with another two in series for 1.0   ohm\n",
        "\n",
        "\n",
        "(c)Three in parallel, in series with one for  1.33   ohm\n",
        "\n",
        "\n",
        "(d)Two in parallel, in series with two in series for  2.5   ohm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 10, page no. 48</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "#initializing  the  variables:\n",
      "R1  =  1;#  in  ohms\n",
      "R2  =  2.2;#  in  ohms\n",
      "R3  =  3;#  in  ohms\n",
      "R4  =  6;#  in  ohms\n",
      "R5  =  18;#  in  ohms\n",
      "R6  =  4;#  in  ohms\n",
      "\n",
      "\n",
      "#calculation:\n",
      "R0  =  1/((1/3)  +  (1/6)  +  (1/18))\n",
      "Rt  =  R1  +  R2  +  R0  +  R6\n",
      "\n",
      "print  \"\\n\\nResult\\n\\n\"\n",
      "print  \"\\n  Equivalent  Resistance  \",Rt,\"  Ohms\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "Result\n",
        "\n",
        "\n",
        "\n",
        "  Equivalent  Resistance   9.0   Ohms"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 11, page no. 48</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "#initializing  the  variables:\n",
      "R1  =  2.5;#  in  ohms\n",
      "R2  =  6;#  in  ohms\n",
      "R3  =  2;#  in  ohms\n",
      "R4  =  4;#  in  ohms\n",
      "Vt  =  200;#  in  volts\n",
      "\n",
      "#calculation:\n",
      "R0  =  1/((1/R2)  +  (1/R3))\n",
      "Rt  =  R1  +  R0  +  R4\n",
      "It  =  Vt/Rt\n",
      "I1  =  It\n",
      "I4  =  It\n",
      "I2  =  R3*It/(R3+R2)\n",
      "I3  =  It  -  I2\n",
      "V1  =  I1*R1\n",
      "V2  =  I2*R2\n",
      "V3  =  I3*R3\n",
      "V4  =  I4*R4\n",
      "\n",
      "print  \"\\n\\nResult\\n\\n\"\n",
      "print  \"\\n  (a)Total  Current  Supply  \",It,\"  Amperes(A)\\n\"\n",
      "print  \"\\n  (b)Current  through  resistors  (R1,  R2,  R3,  R4)\\n \",I1,\",  \",  I2,\",  \",  I3,\",  \",  I4,\"  Amperes(A)  respectively\\n\"\n",
      "print  \"\\n  (c)voltage  across  resistors  (R1,  R2,  R3,  R4)\\n  \",V1,\",  \",  V2,\",  \",  V3,\",  \",  V4,\"  Volts(V)  respectively\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "Result\n",
        "\n",
        "\n",
        "\n",
        "  (a)Total  Current  Supply   25.0   Amperes(A)\n",
        "\n",
        "\n",
        "  (b)Current  through  resistors  (R1,  R2,  R3,  R4)\n",
        "  25.0 ,   6.25 ,   18.75 ,   25.0   Amperes(A)  respectively\n",
        "\n",
        "\n",
        "  (c)voltage  across  resistors  (R1,  R2,  R3,  R4)\n",
        "   62.5 ,   37.5 ,   37.5 ,   100.0   Volts(V)  respectively"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 12, page no. 49</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "#initializing  the  variables:\n",
      "R1  =  15;#  in  ohms\n",
      "R2  =  10;#  in  ohms\n",
      "R3  =  38;#  in  ohms\n",
      "Vt  =  250;#  in  volts\n",
      "P  =  2500;#  in  Watt\n",
      "\n",
      "#calculation:\n",
      "It  =  P/Vt\n",
      "I2  =  R1*It/(R1+R2)\n",
      "I1  =  It  -  I2\n",
      "Re1  =  1/((1/R1)  +  (1/R2))\n",
      "Rt  =  Vt/It\n",
      "Re2  =  Rt  -  Re1\n",
      "Rx  =  1/((1/Re2)  -  (1/R3))\n",
      "I4  =  R3*It/(R3+Rx)\n",
      "I3  =  It  -  I4\n",
      "\n",
      "print  \"\\n\\nResult\\n\\n\"\n",
      "print  \"\\n  (a)Resistance  (Rx)  \",Rx,\"  Ohms\\n\"\n",
      "print  \"\\n  (b)Current  through  resistors  (R1,  R2,  R3,  R4): \\n \",I1,\",  \",  I2,\",  \",  I3,\",  \"\n",
      "print   \",  I4,\"  Amperes(A)  respectively\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "Result\n",
        "\n",
        "\n",
        "\n",
        "  (a)Resistance  (Rx)   38.0   Ohms\n",
        "\n",
        "\n",
        "  (b)Current  through  resistors  (R1,  R2,  R3,  R4): \n",
        "  4.0 ,   6.0 ,   5.0 ,   5.0   Amperes(A)  respectively"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 13, page no. 51</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "#initializing  the  variables:\n",
      "R1  =  8;#  in  ohms\n",
      "R2  =  2;#  in  ohms\n",
      "R3  =  1.4;#  in  ohms\n",
      "R4  =  9;#  in  ohms\n",
      "R5  =  2;#  in  ohms\n",
      "Vt  =  17;#  in  volts\n",
      "\n",
      "#calculation:\n",
      "R01  =  R1*R2/(R1  +  R2)\n",
      "R02  =  R01  +  R3\n",
      "R03  =  R4*R02/(R4  +R02)\n",
      "Rt  =  R5  +  R03\n",
      "It  =  Vt/Rt\n",
      "I1  =  R4*It/(R4  +  R02)\n",
      "Ix  =  R2*I1/(R1  +  R2)\n",
      "\n",
      "print  \"\\n\\nResult\\n\\n\"\n",
      "print  \"\\n  Current(Ix)  \",Ix,\"  Amperes(A)\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "Result\n",
        "\n",
        "\n",
        "\n",
        "  Current(Ix)   0.6   Amperes(A)"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 14, page no. 52</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "#initializing  the  variables:\n",
      "Rt  =  150;#  in  ohms\n",
      "n  =  3;#  no.  of  identical  lamp\n",
      "\n",
      "#calculation:\n",
      "R  =  Rt*3#  (1/Rt)=(1/R)+(1/R)+(1/R)\n",
      "\n",
      "print  \"\\n\\nResult\\n\\n\"\n",
      "print  \"\\n  Resistance  \",R,\"  Ohms\\n\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "Result\n",
        "\n",
        "\n",
        "\n",
        "  Resistance   450   Ohms"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 15, page no. 52</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "#initializing  the  variables:\n",
      "#series  connection\n",
      "n  =  3;#  no.  of  identical  lamp\n",
      "Vt  =  150;#  in  volts\n",
      "\n",
      "#calculation:\n",
      "V  =  Vt/3#  Since  each  lamp  is  identical,  then  V  volts  across  each.\n",
      "\n",
      "print  \"\\n\\nResult\\n\\n\"\n",
      "print  \"\\n  a)Voltage  across  each  resistor  =  \",V,\"  Volts(V)\\n\"\n",
      "print  \"\\n  b)If  lamp  C  fails,  i.e.,  open  circuits,  no  current  will  flow  and lamps  A  and  B  will  not  operate.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "Result\n",
        "\n",
        "\n",
        "\n",
        "  a)Voltage  across  each  resistor  =   50.0   Volts(V)\n",
        "\n",
        "\n",
        "  b)If  lamp  C  fails,  i.e.,  open  circuits,  no  current  will  flow  and lamps  A  and  B  will  not  operate."
       ]
      }
     ],
     "prompt_number": 21
    }
   ],
   "metadata": {}
  }
 ]
}