{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3 : Analog & Electronics Instruments"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.1\n",
      " : Page No - 3.13 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "#Given data\n",
      "N = 100 # number o turns\n",
      "B = 0.15 #air gap in Wb/m**2\n",
      "I = 5 #current in mA\n",
      "I = I * 10**-3 # in A\n",
      "l= 10 #length in mm\n",
      "b = 8 #width in mm\n",
      "A = l*b #area in mm**2\n",
      "A = A * 10**-6 # in m**2\n",
      "Td = N*B*A*I #deflecting torque in Nm\n",
      "K = 0.2*10**-6 # in Nm/degree\n",
      "# Td = Tc= K*theta \n",
      "theta = Td/K #deflecting in degrees\n",
      "print \"The deflecting = %0.f degrees \" %theta"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The deflecting = 30 degrees \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.2\n",
      " : Page No - 3.35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "B = 8*10**-3 #flux density in Wb/m**2\n",
      "N = 300 # number of turns\n",
      "l = 15 #length in mm\n",
      "r = 30 #radius in mm\n",
      "K = 2.5*10**-9 #spring constant in Nm/rad\n",
      "J = 10*10**-9 # in kg-m**2\n",
      "D = 2*10**-9 # in Nm/rads**-1\n",
      "Rg = 80 # in ohm\n",
      "A = l*r # in mm**2\n",
      "A = A * 10**-6 # in m**2\n",
      "G = N*B*A # in Nm/A\n",
      "i = 1 # in \u00b5A\n",
      "i = i * 10**-6 # in A\n",
      "theta_f = (G*i)/K # in rad\n",
      "r = 1 # in m\n",
      "r = r * 10**3 # in mm\n",
      "d = 2*theta_f*r #deflection of galvanometer  in mm\n",
      "print \"The deflection of galvanometer = %0.f mm \" %d\n",
      "Si = d/i # in mm/A\n",
      "Si = Si * 10**-6 #Current sensitivity in mm/\u00b5A\n",
      "print \"Current sensitivity = %0.f mm/\u00b5A \" %Si"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The deflection of galvanometer = 864 mm \n",
        "Current sensitivity = 864 mm/\u00b5A \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.3\n",
      " : Page No - 3.36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import exp, sqrt\n",
      "from numpy import pi\n",
      "#Given data\n",
      "B = 10*10**-3 # in Wb/m**2\n",
      "N = 200 # in turns\n",
      "l = 16 # in mm\n",
      "K = 12*10**-9 # in Nm/rad\n",
      "J = 50*10**-9 # in kg-m**2\n",
      "D = 5*10**-9 # in Nm/rads**-1\n",
      "R = 120 # in ohm\n",
      "A = l**2 # in mm**2\n",
      "A = A * 10**-6 # in m**2\n",
      "G = N*B*A # in Nm/A\n",
      "i = 1 # in \u00b5A\n",
      "i = i * 10**-6 # in A\n",
      "theta_f = (G*i)/K # in rad\n",
      "r = 1 # in m\n",
      "r = r * 10**3 # in mm\n",
      "# deflection of the galvanometer \n",
      "d = 2*theta_f*r # in mm\n",
      "print \"The deflection of the galvanometer   = %0.4f mm \" %d\n",
      "i = i * 10**6 # in \u00b5A\n",
      "# Current sensitivity \n",
      "Si = d/i # in mm/\u00b5A\n",
      "print \"The current sensitivity              = %0.4f mm/\u00b5A \" %Si\n",
      "# Voltage sensitivity \n",
      "Sv = d/(i*R) # in mm/\u00b5V\n",
      "print \"The voltage sensitivity              = %0.3f mm/\u00b5V \" %Sv\n",
      "So = d/(i*10**-6*10**6) #megaohm sensitivity in Mohm/mm\n",
      "print \"The megaohm sensitivity              = %0.3f Mohm/mm \" %So\n",
      "omega_d = (sqrt((4*J*K) - ((D)**2)))/(2*J) # in rad/sec\n",
      "f_d = omega_d/(2*pi) #frequency of damped oscillation  in Hz\n",
      "print \"The frequency of damped oscillation  = %0.4f Hz \" %f_d\n",
      "omega_n = sqrt(K/J) \n",
      "# period of free oscillation \n",
      "To = (2*pi)/omega_n # in sec\n",
      "print \"The period of free oscillation       = %0.3f sec \" %To\n",
      "Dc = 2*sqrt( J*K ) \n",
      "# The relative damping \n",
      "Epsilon = D/Dc \n",
      "print \"The relative damping                 = %0.3f \" %Epsilon\n",
      "# The first maximum deflection \n",
      "theta1 = theta_f * ( 1 + (exp(-pi*Epsilon)/(sqrt(1 - ((Epsilon)**2)))) ) # in rad\n",
      "theta1 = theta1*2*r # in mm\n",
      "print \"The first maximum deflection         = %0.3f mm \" %theta1\n",
      "# The logarithmic decrement \n",
      "lembda = (pi*Epsilon)/(sqrt(1 - ((Epsilon)**2))) \n",
      "print \"The logarithmic decrement            = %0.4f \" %lembda"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The deflection of the galvanometer   = 85.3333 mm \n",
        "The current sensitivity              = 85.3333 mm/\u00b5A \n",
        "The voltage sensitivity              = 0.711 mm/\u00b5V \n",
        "The megaohm sensitivity              = 85.333 Mohm/mm \n",
        "The frequency of damped oscillation  = 0.0776 Hz \n",
        "The period of free oscillation       = 12.825 sec \n",
        "The relative damping                 = 0.102 \n",
        "The first maximum deflection         = 147.584 mm \n",
        "The logarithmic decrement            = 0.3223 \n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.4\n",
      " : Page No - 3.39"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Rm = 100 #internal resistance in ohm\n",
      "Im = 2 # in mA\n",
      "Im = Im * 10**-3 # in A\n",
      "I = 150 # in mA\n",
      "I = I * 10**-3 # in A\n",
      "Rsh = (Im*Rm)/(I-Im) #shunt resistance in ohm\n",
      "print \"The value of shunt resistance = %0.3f ohm \" %Rsh\n",
      "\n",
      "# Note: The calculation in the book is wrong."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of shunt resistance = 1.351 ohm \n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.5\n",
      " : Page No - 3.40"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Rsh = 0.01 #shunt resistance in ohm\n",
      "Rm = 750 #resistance in ohm\n",
      "Vm= 400*10**-3 #voltage in V\n",
      "Ish = 50 #current in A\n",
      "# Ish*Rsh = voltagedrop \n",
      "Ish = Vm/Rsh #current through shunt  in A\n",
      "print \"The current through shunt = %0.f A \" %Ish\n",
      "Ish=50 # in A\n",
      "Vsh = Ish*Rsh # in V\n",
      "Im = Vm/Rm # in A\n",
      "# Im*R_m = Vsh \n",
      "R_m = Vsh/Im #resistance of meter in ohm\n",
      "print \"The resistance of meter = %0.1f \u03a9 \" %R_m"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The current through shunt = 40 A \n",
        "The resistance of meter = 937.5 \u03a9 \n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.6\n",
      " : Page No - 3.41"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "# The first range is 0-10 mA\n",
      "I1 = 10 #in mA\n",
      "Im = 2 # in mA\n",
      "Rm = 75 # in ohm\n",
      "R1 = (Im*Rm)/(I1-Im) # in ohm\n",
      "print \"The value of R1 = %0.2f ohm \" %R1\n",
      "# Second range is 0-50 mA\n",
      "I2 = 50 # in mA\n",
      "R2 = (Im*Rm)/(I2-Im) # in ohm\n",
      "print \"The value of R2 = %0.3f ohm \" %R2\n",
      "# The third range is 0-100 mA\n",
      "I3 = 100 # in mA\n",
      "R3 = (Im*Rm)/(I3-Im) # in ohm\n",
      "print \"The value of R3 = %0.2f ohm \" %R3"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of R1 = 18.75 ohm \n",
        "The value of R2 = 3.125 ohm \n",
        "The value of R3 = 1.53 ohm \n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.7\n",
      " : Page No - 3.43"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import numpy as np\n",
      "#Given data\n",
      "I1 = 10 # in A\n",
      "Im = 1*10**-3 # in A\n",
      "Rm = 50 # in ohm\n",
      "I2 = 5 # in A\n",
      "I3 = 1 # in A\n",
      "# I1*R1= Im*(R2+R3+Rm) or I1*R1 - Im*R2 - Im*R3 = Im*Rm       (i)\n",
      "# I2*(R1+R2) = Im*(R3+Rm) or I2*R1 + I2*R2 - Im*R3 = Im*Rm     (ii)\n",
      "# I3*(R1+R2+R3) = Im*Rm or I3*R1 + I3*R2 + I3*R3 = Im*Rm           (iii)\n",
      "# Solving eq (i),(ii) and (iii) \n",
      "A= np.array([[I1,-Im,-Im],[I2,I2,-Im],[I3,I3,I3]])\n",
      "B= np.array([Im*Rm,Im*Rm,Im*Rm])\n",
      "R= np.linalg.solve(A,B)\n",
      "R1= R[0] #value of R1 in ohm\n",
      "R2= R[1] #value of R2 in ohm\n",
      "R3= R[2] #value of R3 in ohm\n",
      "print \"The value of R1 = %0.3f ohm \" %R1\n",
      "print \"The value of R2 = %0.3f ohm \" %R2\n",
      "print \"The value of R3 = %0.3f ohm \" %R3\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of R1 = 0.005 ohm \n",
        "The value of R2 = 0.005 ohm \n",
        "The value of R3 = 0.040 ohm \n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.8\n",
      " : Page No - 3.46"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Rm = 500 #resistance of meter in ohm\n",
      "Im = 40 #current in \u00b5A\n",
      "Im = Im * 10**-6 # in A\n",
      "V = 10 #voltage in V\n",
      "# The required multiplier resistance \n",
      "Rs = (V/Im)-Rm # in ohm\n",
      "Rs = Rs * 10**-3 # in k ohm\n",
      "print \"The required multiplier resistance = %0.1f k\u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required multiplier resistance = 249.5 k\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.9\n",
      " : Page No - 3.47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Im = 20 #current in mA\n",
      "Vm = 200 #voltage in mV\n",
      "# Vm = Im*Rm \n",
      "Rm = Vm/Im #resistance in ohm\n",
      "I = 200 # in A\n",
      "Im = Im * 10**-3 # in A\n",
      "Rsh = (Im*Rm)/(I-Im) #required shunt resistance in ohm\n",
      "print \"The required shunt resistance = %0.3f \u03a9 \" %Rsh\n",
      "V = 500 # in V\n",
      "Rs = (V/Im)-Rm #required multiplier resistance in ohm\n",
      "Rs = Rs * 10**-3 # in k ohm\n",
      "print \"The required multiplier resistance = %0.2f k\u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required shunt resistance = 0.001 \u03a9 \n",
        "The required multiplier resistance = 24.99 k\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.10\n",
      " : Page No - 3.49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Rm = 50 #resistance of meter in ohm\n",
      "Im = 2 #current in mA\n",
      "Im = Im * 10**-3 # in A\n",
      "V4 = 10 #voltage in V\n",
      "R4 = (V4/Im) - Rm # in ohm\n",
      "R4= R4*10**-3 # in k ohm\n",
      "print \"The value of R4 = %0.2f k\u03a9 \" %R4\n",
      "R4= R4*10**3 # in ohm\n",
      "V3 = 50 # in V\n",
      "# (R3+R4) = (V3/Im) - Rm \n",
      "R3 = (V3/Im) - Rm-R4 # in ohm\n",
      "R3= R3*10**-3 # in k ohm\n",
      "print \"The value of R3 = %0.f k\u03a9 \" %R3\n",
      "R3= R3*10**3 # in ohm\n",
      "V2 = 100 # in V\n",
      "#(R2+R3+R4) = (V2/Im) - Rm \n",
      "R2 = (V2/Im) - Rm - R3 - R4 # in ohm\n",
      "R2= R2*10**-3 # in k ohm\n",
      "print \"The value of R2 = %0.f k\u03a9 \" %R2\n",
      "R2= R2*10**3 # in ohm\n",
      "V1 = 500 # in V\n",
      "# (R1+R2+R3+R4) = (V1/Im) - Rm \n",
      "R1 = (V1/Im) - Rm - R4 - R3 - R2 # in ohm\n",
      "R1= R1*10**-3 # in k ohm\n",
      "print \"The value of R1 = %0.f k\u03a9 \" %R1"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of R4 = 4.95 k\u03a9 \n",
        "The value of R3 = 20 k\u03a9 \n",
        "The value of R2 = 25 k\u03a9 \n",
        "The value of R1 = 200 k\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.11\n",
      " : Page No - 3.51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Rm = 50 #meter resistance in ohm\n",
      "Im = 2 #current in mA\n",
      "Im = Im * 10**-3 # in A\n",
      "S = 1/Im #sensitivity in ohm/V\n",
      "# Voltage ranges\n",
      "V1 = 500 # in V\n",
      "V2 = 100 # in V\n",
      "V3 = 50 # in V\n",
      "V4 = 10 # in V\n",
      "R4 = (S*V4) - Rm # in ohm\n",
      "R4= R4*10**-3 # in k ohm\n",
      "print \"The value of R4 = %0.2f k\u03a9  \" %R4\n",
      "R4= R4*10**3 # in ohm\n",
      "R3 = (S*V3) - (Rm+R4) # in ohm\n",
      "R3= R3*10**-3 # in k ohm\n",
      "print \"The value of R3 = %0.f k\u03a9 \" %R3\n",
      "R3= R3*10**3 # in ohm\n",
      "R2 = (S*V2) - (Rm+R4+R3) # in ohm\n",
      "R2= R2*10**-3 # in k ohm\n",
      "print \"The value of R2 = %0.f k\u03a9 \" %R2\n",
      "R2= R2*10**3 # in ohm\n",
      "R1 = (S*V1) - (Rm+R2+R3+R4) # in ohm\n",
      "R1= R1*10**-3 # in k ohm\n",
      "print \"The value of R1 = %0.f k\u03a9 \" %R1"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of R4 = 4.95 k\u03a9  \n",
        "The value of R3 = 20 k\u03a9 \n",
        "The value of R2 = 25 k\u03a9 \n",
        "The value of R1 = 200 k\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.12\n",
      " : Page No - 3.52"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Im = 50 #current in \u00b5A\n",
      "Im = Im * 10**-6 # in A\n",
      "S = 1/Im # in ohm/V\n",
      "V = 500 # in V\n",
      "Rm = 200 #internal resistance in ohm\n",
      "Rs = (S*V) - Rm #multiplier resistance in ohm\n",
      "Rs = Rs * 10**-6 # in Mohm\n",
      "print \"The value of multiplier resistance = %0.f M\u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of multiplier resistance = 10 M\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.13\n",
      " : Page No - 3.52"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Rs = 25 #resistance in k ohm\n",
      "Rs = Rs * 10**3 # in ohm\n",
      "Rm = 1 #meter resistance in k ohm\n",
      "Rm = Rm * 10**3 # in k ohm\n",
      "V = 100 #voltage in V\n",
      "# Rs = (S*V) - Rm \n",
      "S = (Rs+Rm)/V #sensitivity in ohm/V\n",
      "print \"For meter A:  The value of S =\",int(S),\" \u03a9/V\"\n",
      "Rs = 150 # in  k ohm\n",
      "Rs = Rs * 10**3 # in ohm\n",
      "V = 1000 # in V\n",
      "# Rs = (S*V) - Rm \n",
      "S = (Rs+Rm)/V # in ohm/V meter B\n",
      "print \"For meter B:  The value of S =\",int(S),\" \u03a9/V\" \n",
      "print \"The meter A is more sensitive than meter B\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "For meter A:  The value of S = 260  \u03a9/V\n",
        "For meter B:  The value of S = 151  \u03a9/V\n",
        "The meter A is more sensitive than meter B\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.14\n",
      " : Page No - 3.53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "# Case (i): When voltmeter having a sensitivity of 500 \u03a9/V\n",
      "R1 = 20 # in k ohm\n",
      "R2 = 25 # in k ohm\n",
      "Vdc = 250 # in V\n",
      "V = (Vdc/(R1+R2))*R2 # in V\n",
      "Vrange = 150 # in V\n",
      "S = 500 # in ohm/V\n",
      "R_V = S*Vrange # in ohm\n",
      "R_V = R_V * 10**-3 # in k ohm\n",
      "Req = (R2*R_V)/(R2+R_V) # in k ohm\n",
      "V = (Req/(Req+R1))*Vdc # in V voltmeter first\n",
      "print \"Case (i): When voltmeter having a sensitivity of 500 \u03a9/V\" \n",
      "print \"                The voltmeter will reads : \",round(V,2),\" V\" \n",
      "# Case (ii): When voltmeter having a sensitivity of 1000 \u03a9/V\n",
      "S = 10000 # in ohm/V\n",
      "R_V = S*Vrange # in ohm\n",
      "R_V = R_V * 10**-3 # in k ohm\n",
      "Req = (R2*R_V)/(R2+R_V) # in k ohm\n",
      "V = (Req/(Req+R1))*Vdc # in V  Voltmeter second\n",
      "print \"Case (ii): When voltmeter having a sensitivity of 1000 \u03a9/V\" \n",
      "print \"                 The voltmeter will reads : \",round(V,2),\" V\"  \n",
      "print \"Thus the second voltmeter reads more accurately.\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case (i): When voltmeter having a sensitivity of 500 \u03a9/V\n",
        "                The voltmeter will reads :  120.97  V\n",
        "Case (ii): When voltmeter having a sensitivity of 1000 \u03a9/V\n",
        "                 The voltmeter will reads :  137.87  V\n",
        "Thus the second voltmeter reads more accurately.\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.15\n",
      " : Page No - 3.55"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Ra = 5 # in k ohm\n",
      "Rb = 1 # in k ohm\n",
      "V = 25 # in V \n",
      "Vrange = 5 # in V\n",
      "S = 1 # in k ohm/V\n",
      "# True voltage across Rb \n",
      "Vb = (Rb/(Ra+Rb))*V # in V\n",
      "print \"The true voltage across Rb = %0.3f V \" %Vb\n",
      "R_V = S*Vrange # in k ohm\n",
      "Req = (Rb*R_V)/(Rb+R_V) # in k ohm\n",
      "V1 = (Req/(Req+Ra))*V #reading on the voltmeter 1  in V\n",
      "print \"The reading on the voltmeter 1 = %0.3f V \" %V1\n",
      "S = 20 # in k ohm/V\n",
      "R_V = S*Vrange # in k ohm\n",
      "Req = (Rb*R_V)/(Rb+R_V) # in k ohm\n",
      "V2 = (Req/(Ra+Req))*V #reading on the voltmeter 2 in V\n",
      "print \"The reading on the voltmeter 2 = %0.3f V \" %V2\n",
      "PerError1 = ((Vb-V1)/Vb)*100 #percentage error in meter 1 in % \n",
      "print \"The percentage error in voltmeter 1 = %0.1f %% \" %PerError1\n",
      "PerError2 = ((Vb-V2)/Vb)*100 #percentage error in meter 2 in %\n",
      "print \"The percentage error in voltmenter 2= %0.2f %% \" %PerError2\n",
      "PerAccuracy1 = 100 - PerError1 #percentage accuracy of meter 1 in %\n",
      "print \"The percentage accuarcy of voltmeter 1 = %0.1f %% \" %PerAccuracy1\n",
      "PerAccuracy2 = 100-PerError2 #percentage accuracy of meter 2 in %\n",
      "print \"The percentage accuracy of voltmeter 2 = %0.2f %% \" %PerAccuracy2\n",
      "print \"Thus voltmeter 2 is \",round(PerAccuracy2,2),\"% accurate while voltmeter 1 is\",round(PerAccuracy1,1),\"% accurate\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The true voltage across Rb = 4.167 V \n",
        "The reading on the voltmeter 1 = 3.571 V \n",
        "The reading on the voltmeter 2 = 4.132 V \n",
        "The percentage error in voltmeter 1 = 14.3 % \n",
        "The percentage error in voltmenter 2= 0.83 % \n",
        "The percentage accuarcy of voltmeter 1 = 85.7 % \n",
        "The percentage accuracy of voltmeter 2 = 99.17 % \n",
        "Thus voltmeter 2 is  99.17 % accurate while voltmeter 1 is 85.7 % accurate\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.16\n",
      " : Page No - 3.70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Erms = 10 #r.m.s. range of the voltmeter in V\n",
      "Ep = sqrt(2)*Erms # in V\n",
      "Eav = 0.6*Ep # in V\n",
      "Eav = 9 # in V \n",
      "Eavoutput = (1/2)*Eav # in V\n",
      "Edc = 0.45*Erms # in V\n",
      "Idc = 1 # in mA\n",
      "Idc = Idc * 10**-3 # in A\n",
      "Rm = 200 # in W\n",
      "Rs = (Edc/Idc) - Rm #required multiplier resistance in ohm\n",
      "Rs = Rs * 10**-3 # in k ohm\n",
      "print \"The required multiplier resistance = %0.1f k\u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required multiplier resistance = 4.3 k\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 34
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.17\n",
      " : Page No - 3.70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Idc = 2 #dc current in mA\n",
      "Idc = Idc * 10**-3 # in A\n",
      "Rm = 500 #meter resistance in ohm\n",
      "Erms = 10 #r.m.s value in v\n",
      "Eav = 9 #average value in V\n",
      "Edc = 0.9*Erms #dc voltage in V\n",
      "Rs = (Edc/Idc) - Rm #multiplier resistance in ohm\n",
      "Rs = Rs * 10**-3 # in k ohm\n",
      "print \"The multiplier resistance = %0.f k\u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The multiplier resistance = 4 k\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 35
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.18\n",
      " : Page No - 3.72"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Kf_true = 1 # true value of form factor\n",
      "Kf_measured= 1.11 # measured value of form factor\n",
      "PerError = ((Kf_true-Kf_measured)/Kf_true)*100 #percentage error in the meter reading in %\n",
      "print \"The percentage error in the meter reading = %0.f %% \" %PerError"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The percentage error in the meter reading = -11 % \n"
       ]
      }
     ],
     "prompt_number": 37
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.19\n",
      " : Page No - 3.73"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from scipy.integrate import quad\n",
      "from math import sqrt\n",
      "#Given data\n",
      "V1 = 100 # in V\n",
      "V2 = 0 # in V\n",
      "e1= 0 # in V\n",
      "e2= 100 # in V\n",
      "T=2 # in sec\n",
      "T1 = 0 # in sec\n",
      "T2 = 2 # in sec\n",
      "# Slope of ramp\n",
      "A= (e2-e1)/(T2-T1) # in V/sec\n",
      "e= 'A*t' # in sec\n",
      "def integrand(t):\n",
      "    return ((50*t)**2)\n",
      "ans, err = quad(integrand, 0, 2)\n",
      "Erms= sqrt(1/T*ans) # in V\n",
      "def integrand(t):\n",
      "    return (50*t)\n",
      "ans, err = quad(integrand, 0, 2)\n",
      "Eav= 1/T*ans # in V\n",
      "Kf= Erms/Eav # form factor\n",
      "Kf_sine= 1.11 # form factor of sine wave\n",
      "True_reading= 1 # true reading\n",
      "Meas_reading= Kf_sine/Kf # measured reading\n",
      "PerError= (True_reading-Meas_reading)/True_reading*100 #percentage error in the reading in %\n",
      "print \"The percentage error in the reading = + %0.2f %% \" %PerError"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The percentage error in the reading = + 3.87 % \n"
       ]
      }
     ],
     "prompt_number": 35
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.20\n",
      " : Page No - 3.79"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Erms = 200 #r.m.s value in V\n",
      "Rm = 100 #meter resistance in ohm\n",
      "Idc = 25 #dc current in mA\n",
      "Idc= Idc*10**-3 # in A\n",
      "Rf = 500 # in ohm\n",
      "R_D = 2*Rf # in ohm\n",
      "Edc = 0.9*Erms # in V\n",
      "Rs = (Edc/Idc) - Rm # in ohm\n",
      "R_m = Rm+R_D # in ohm\n",
      "Rs = (Edc/Idc) - R_m #required series resistance in ohm\n",
      "print \"The required series resistance = %0.f \u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required series resistance = 6100 \u03a9 \n"
       ]
      }
     ],
     "prompt_number": 39
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.21\n",
      " : Page No - 3.84"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "r = 2 #radius in m\n",
      "r = r * 10**3 # in mm\n",
      "d = 200 #deflection in mm\n",
      "To = 3.1415 # in sec   \n",
      "J = 2*10**-6 # in kg-m**2\n",
      "i = 1 # in \u00b5A\n",
      "i = i * 10**-6 # in A\n",
      "# d = 2*r*theta_f \n",
      "theta_f = d/(2*r) # in rad\n",
      "# To = 2*pi * (sqrt( J/K )) \n",
      "K = 4*pi**2*J/To**2 # in Nm/A\n",
      "# theta_f = (G*i)/K \n",
      "G = (theta_f*K)/i # in Nm/A\n",
      "# The required resistance to obtain critical damping \n",
      "Rc = G**2/( 2*sqrt(J*K)) # in ohm\n",
      "Rc = Rc * 10**-3 # in k ohm\n",
      "print \"The required resistance to obtain critical damping = %0.f k\u03a9 \" %Rc"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required resistance to obtain critical damping = 20 k\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 40
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.22\n",
      " : Page No - 3.85"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log\n",
      "#Given data\n",
      "theta1 = 128 #first maximum deflection in mm\n",
      "theta3 = 90 #second maximum deflection in mm\n",
      "theta_f = 70 # in mm\n",
      "i = 6.2 # in \u00b5A\n",
      "# The current sensitivity \n",
      "Si = theta_f/i # in mm/\u00b5A\n",
      "print \"The current sensitivity = %0.4f mm/\u00b5A \" %Si\n",
      "# The logarithmic decrement \n",
      "# Formula %e**(2*lambda)= (theta1-thetaf)/(theta3-thetaf)\n",
      "lembda = log((theta1-theta_f)/(theta3-theta_f) )*(1/2) \n",
      "print \"The logarithmic decrement = %0.4f \" %lembda\n",
      "# lembda = (pi*sie)/(sqrt( 1-((sie)**2) )) \n",
      "# ((lembda/pi)**2) = ((sie)**2)/(sqrt( 1-((sie)**2) )) \n",
      "sie = lembda/sqrt(lembda**2+pi**2) # the relative damping\n",
      "print \"The relative damping = %0.3f \" %sie"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The current sensitivity = 11.2903 mm/\u00b5A \n",
        "The logarithmic decrement = 0.5324 \n",
        "The relative damping = 0.167 \n"
       ]
      }
     ],
     "prompt_number": 42
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.23\n",
      " : Page No - 3.86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "I = 100 # in mA\n",
      "Im = 1 # in mA\n",
      "Rm = 25 # in ohm\n",
      "# m = I/Im = 1 + Rm/Rsh \n",
      "Rsh = Rm/((I/Im) - 1) # in ohm\n",
      "del_t = 10 # in \u00b0C\n",
      "Alpha_c = 0.004 \n",
      "Alpha_m = 0.00015 \n",
      "# When temperature increase by 10 \u00b0C\n",
      "R_m = Rm * ( 1 + (Alpha_c*del_t) ) # in ohm\n",
      "R_sh = Rsh * (1 + (Alpha_m*del_t)) # in ohm\n",
      "# When I= 100 mA then\n",
      "I_m = (R_sh/(R_sh+R_m))*I # in mA\n",
      "# But Im required for full scale deflection\n",
      "PerEerror= ((I_m-Im)/Im)*100 # in %\n",
      "print \"Part (i) \"\n",
      "print \"The percentage error = %0.3f %% \" %PerEerror\n",
      "Rx = 75 # in ohm\n",
      "Rtotal = Rm+Rx # in ohm\n",
      "Rsh = Rtotal/((I/Im) - 1) # in ohm\n",
      "#R_total =R_m+R_x \n",
      "R_total = R_m + (Rx*(1+(Alpha_m*del_t))) # in ohm\n",
      "R_sh = Rsh * (1+( Alpha_m*del_t )) # in ohm\n",
      "I_m = (R_sh/(R_sh+R_total))*I # in mA\n",
      "PerEerror = ((I_m-Im)/Im)*100 #percentage error in %\n",
      "print \"Part (ii) \"\n",
      "print \"The percentage error = %0.2f %% \" %PerEerror"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Part (i) \n",
        "The percentage error = -3.666 % \n",
        "Part (ii) \n",
        "The percentage error = -0.94 % \n"
       ]
      }
     ],
     "prompt_number": 45
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.24\n",
      " : Page No - 3.88"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Im =25 #current in mA\n",
      "Im = Im * 10**-3 # in A\n",
      "Rm = 10 #resistance in ohm\n",
      "I = 20 # in A\n",
      "Rsh = (Im*Rm)/(I-Im) #shunt resistance in ohm\n",
      "print \"The value of Rsh = %0.5f \u03a9 \" %Rsh\n",
      "V = 120 # in V\n",
      "Rs = (V/Im)-Rm # in ohm\n",
      "print \"The value of Rs = %0.f \u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of Rsh = 0.01252 \u03a9 \n",
        "The value of Rs = 4790 \u03a9 \n"
       ]
      }
     ],
     "prompt_number": 46
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.25\n",
      " : Page No - 3.88"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Vm = 10 # in mV\n",
      "Vm = Vm * 10**-3 # in V\n",
      "Rm = 1 # in k ohm\n",
      "Rm = Rm * 10**3 # in ohm\n",
      "Im = Vm/Rm # in A\n",
      "# Part (i) : For the range of 100 mV\n",
      "Vrange = 100 # in mV\n",
      "Vrange = Vrange * 10**-3 # in V\n",
      "Rs = (Vrange/Im) - Rm # in ohm\n",
      "Rs= Rs*10**-3 # in kohm\n",
      "print \"Part (i) For the range of 100 mV\"\n",
      "# Part (ii) : For the range of 1 V\n",
      "print \"The value of Rs = %0.f k\u03a9 \" %Rs\n",
      "Vrange = 1 # in V\n",
      "Rs = (Vrange/Im) - Rm # in ohm\n",
      "Rs= Rs*10**-3 # in kohm\n",
      "print \"Part (i) For the range of 1V\"\n",
      "print \"The value of Rs = %0.f k\u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Part (i) For the range of 100 mV\n",
        "The value of Rs = 9 k\u03a9 \n",
        "Part (i) For the range of 1V\n",
        "The value of Rs = 99 k\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 48
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.26\n",
      " : Page No - 3.89"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Vm = 0.1 #full scale deflection voltage in V\n",
      "Rm = 20 #meter resistance in ohm\n",
      "Im = Vm/Rm #current in A\n",
      "I1= 10 # in A\n",
      "I2= 1 # in A\n",
      "I3= 100*10**-3 # in A\n",
      "# I1*R1 = Im*(R2+R3+Rm) or   I1*R1 - Im*R2 - Im*R3 = Im*Rm       (i)\n",
      "# I2*(R1+R2) = Im*(R3+Rm) or I2*R1 + I2*R2 -Im*R3 = Im*Rm      (ii)\n",
      "# I3*(R1+R2+R3) = Im*Rm or   I3*R1 + I3*R2 + I3*R3 = Im*Rm     (iii)\n",
      "\n",
      "#A= [I1 I2 I3 -Im I2 I3 -Im -Im I3] \n",
      "#B= [Im*Rm Im*Rm Im*Rm] \n",
      "#R= B*A**-1 # Solving equation (i), (ii) and (iii) by matrix method\n",
      "\n",
      "\n",
      "A= np.array([[I1,-Im,-Im],[I2,I2,-Im],[I3,I3,I3]])\n",
      "B= np.array([Im*Rm,Im*Rm,Im*Rm])\n",
      "R= np.linalg.solve(A,B)\n",
      "R1= R[0] #value of R1 in ohm\n",
      "R2= R[1] #value of R2 in ohm\n",
      "R3= R[2] #value of R3 in ohm\n",
      "\n",
      "print \"The value of R3 = %0.4f ohm \" %R3\n",
      "print \"The value of R1 = %0.4f ohm \" %R1\n",
      "print \"The value of R2 = %0.4f ohm \" %R2\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of R3 = 0.8955 ohm \n",
        "The value of R1 = 0.0105 ohm \n",
        "The value of R2 = 0.0940 ohm \n"
       ]
      }
     ],
     "prompt_number": 43
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.27\n",
      " : Page No - 3.90"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Im = 10 #current in mA\n",
      "Im = Im * 10**-3 # in A\n",
      "Rm = 50 #meter resistance in ohm\n",
      "I = 5 # in A\n",
      "# Value of resistance to be connected in parallel \n",
      "Rsh = (Im*Rm)/(I-Im) # in ohm\n",
      "print \"The value of resistance to be connected in parallel = %0.4f \u03a9 \" %Rsh\n",
      "V = 250 # in V\n",
      "# The value of resistance to be connected in series \n",
      "Rs = (V/Im) - Rm # in ohm\n",
      "print \"The value of resistance to be connected in series = %0.f \u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of resistance to be connected in parallel = 0.1002 \u03a9 \n",
        "The value of resistance to be connected in series = 24950 \u03a9 \n"
       ]
      }
     ],
     "prompt_number": 53
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.28\n",
      " : Page No - 3.91"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Im = 1 # in mA\n",
      "Im = Im * 10**-3 # in A\n",
      "Rm = 100 # in ohm\n",
      "I = 100 # in mA\n",
      "I = I * 10**-3 # in A\n",
      "# For 100 mA range, the value of Rsh to be connected in parallel \n",
      "Rsh = (Im*Rm)/(I-Im) # in ohm\n",
      "print \"For 100 mA range, the value of Rsh to be connected in parallel = %0.2f \u03a9 \" %Rsh\n",
      "I = 1 # in A\n",
      "# For 1 A range, the value of Rsh to be connected in parallel \n",
      "Rsh = (Im*Rm)/(I-Im) # in ohm\n",
      "print \"For 1A range, the value of Rsh to be connected in parallel = %0.1f \u03a9 \" %Rsh\n",
      "V = 1 # in V\n",
      "# For 1V range, the value of Rs to be connected in series\n",
      "Rs = (V/Im)-Rm # in ohm\n",
      "print \"For 1V range, the value of Rs to be connected in series = %0.f \u03a9 \" %Rs\n",
      "V = 100 # in V\n",
      "# For 100 V range, the value of Rs to be connected in series\n",
      "Rs = (V/Im)-Rm # in ohm\n",
      "Rs= Rs*10**-3 # in k ohm\n",
      "print \"For 100V range, the value of Rs to be connected in series = %0.1f k\u03a9 \" %Rs"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "For 100 mA range, the value of Rsh to be connected in parallel = 1.01 \u03a9 \n",
        "For 1A range, the value of Rsh to be connected in parallel = 0.1 \u03a9 \n",
        "For 1V range, the value of Rs to be connected in series = 900 \u03a9 \n",
        "For 100V range, the value of Rs to be connected in series = 99.9 k\u03a9 \n"
       ]
      }
     ],
     "prompt_number": 54
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.29\n",
      " : Page No - 3.91"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Rm = 100 #meter resistance in ohm\n",
      "Im = 2 #current in mA\n",
      "Im = Im * 10**-3 # in A\n",
      "I = 150 # in mA\n",
      "I = I * 10**-3 # in A\n",
      "m = I/Im \n",
      "Rsh = Rm/(m-1) #required shunt resistance in ohm\n",
      "print \"The value of required shunt resistance = %0.4f \u03a9 \" %Rsh\n",
      "Pm = ((Im)**2)*Rm # in W \n",
      "Psh = ((I-Im)**2)*Rsh # in W\n",
      "P = Pm+Psh #power consumption  in W\n",
      "P = P * 10**3 # in mW\n",
      "print \"The power consumption = %0.f mW \" %P"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of required shunt resistance = 1.3514 \u03a9 \n",
        "The power consumption = 30 mW \n"
       ]
      }
     ],
     "prompt_number": 55
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example - 3.30\n",
      " : Page No - 3.92 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "std_cell_emf = 1.45 #e.m.f. of standard cell in V\n",
      "l = 50 #length in cm\n",
      "Vdrop = std_cell_emf /l #voltage drop per unit length in V/cm\n",
      "Vstdresistor = Vdrop*75 #voltage across standard resistor in V\n",
      "Stdresistor = 0.1 #standard resistor in ohm\n",
      "I = Vstdresistor/Stdresistor #magnitude of current  in A\n",
      "print \"The magnitude of current = %0.2f A \" %I"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The magnitude of current = 21.75 A \n"
       ]
      }
     ],
     "prompt_number": 56
    }
   ],
   "metadata": {}
  }
 ]
}