{
 "metadata": {
  "name": "",
  "signature": "sha256:bdd656fed7f10d93c7a67c0d4b91d52fe54d8da8dccf8f5895d7bcbc0d9058e2"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter8-Analysis of transistor Amplifier using Hybrid Equivalent\n",
      "Circuit"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg262"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_1\n",
      "import math\n",
      "print(\"(a)\")\n",
      "Vce=0.\n",
      "Ic=2.*10**-3\n",
      "Ib=30.*10**-6\n",
      "Vbe=50.*10**-3\n",
      "print'%s %.f %s'%(\"Vce = \",(Vce),\"V\")##collector-emitter voltage\n",
      "print'%s %.2e %s'%(\"Ic = \",(Ic),\"A\")##collector current\n",
      "print'%s %.f %s'%(\"Ib = \",(Ib),\"A\")##base current\n",
      "print'%s %.2f %s'%(\"Vbe = \",(Vbe),\"V\")##base-emitter voltage\n",
      "hfe=Ic/Ib\n",
      "print'%s %.2f %s'%(\"hfe = Ic/Ib = \",(hfe),\"\")##current gain in CE amplifier\n",
      "hie=Vbe/Ib\n",
      "print'%s %.2f %s'%(\"hie = Vbe/Ib = \",(hie),\"ohm\")##input impedance in CE amplifier\n",
      "print(\"(b)\")\n",
      "Ib=0.\n",
      "Vce=1.\n",
      "Vbe=0.3*10**-3\n",
      "Ic=0.1*10**-3\n",
      "print'%s %.f %s'%(\"Vce = \",(Vce),\"V\")##collector-emitter voltage\n",
      "print'%s %.2e %s'%(\"Ic = \",(Ic),\"A\")##collector current\n",
      "print'%s %.f %s'%(\"Ib = \",(Ib),\"A\")##base current\n",
      "print'%s %.2e %s'%(\"Vbe = \",(Vbe),\"V\")##base-emitter voltage\n",
      "hoe=Ic/Vce\n",
      "print'%s %.2e %s'%(\"hoe = Ic/Vce = \",(hoe),\"mho\")##output conductance in CE amplifier\n",
      "hre=Vbe/Vce\n",
      "print'%s %.2e %s'%(\"hre = Vbe/Vce = \",(hre),\"\")##voltage gain in CE amplifier\n",
      "\n",
      "## note: textbook answers has printing mistake, regaeding hre.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        "Vce =  0 V\n",
        "Ic =  2.00e-03 A\n",
        "Ib =  0 A\n",
        "Vbe =  0.05 V\n",
        "hfe = Ic/Ib =  66.67 \n",
        "hie = Vbe/Ib =  1666.67 ohm\n",
        "(b)\n",
        "Vce =  1 V\n",
        "Ic =  1.00e-04 A\n",
        "Ib =  0 A\n",
        "Vbe =  3.00e-04 V\n",
        "hoe = Ic/Vce =  1.00e-04 mho\n",
        "hre = Vbe/Vce =  3.00e-04 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg263"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_2\n",
      "import math\n",
      "RL = 8.*10**3\n",
      "hie=1.0*10**3\n",
      "hre=2.5*10**-4\n",
      "hfe=50.\n",
      "hoe=25.*10**-6\n",
      "print'%s %.2f %s'%(\"RL = \",(RL),\"ohm\")##load resistance\n",
      "##h-parameters for CE transistor amplifier are as follows:\n",
      "print'%s %.2f %s'%(\"hie = \",(hie),\"ohm\")##input resistance of CE transistor\n",
      "print'%s %.2e %s'%(\"hre = \",(hre),\"\")##voltage gain of CE transistor\n",
      "print'%s %.2f %s'%(\"hfe = \",(hfe),\"\")##current gain of CE transistor\n",
      "print'%s %.2e %s'%(\"hoe = \",(hoe),\"mho\")##output conductance of CE transistor\n",
      "##calculation for current gain:\n",
      "Ai=-hfe/(1.+(hoe*RL))\n",
      "print'%s %.2f %s'%(\"Ai = -hfe/(1+(hoe*RL)) = \",(Ai),\"\")\n",
      "print'%s %.2f %s'%(\"Ai = \",(abs(Ai)),\"\")\n",
      "##calculation for input resistance:\n",
      "Ri = hie+(hre*Ai*RL)\n",
      "print'%s %.2f %s'%(\"Ri = hie+(hre*Ai*RL) = \",(Ri),\"ohm\")\n",
      "\n",
      "##note : answer in the textbook regarding above problem is not accuratly calculated.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "RL =  8000.00 ohm\n",
        "hie =  1000.00 ohm\n",
        "hre =  2.50e-04 \n",
        "hfe =  50.00 \n",
        "hoe =  2.50e-05 mho\n",
        "Ai = -hfe/(1+(hoe*RL)) =  -41.67 \n",
        "Ai =  41.67 \n",
        "Ri = hie+(hre*Ai*RL) =  916.67 ohm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg263"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_3\n",
      "import math\n",
      "RL = 8.*10**3\n",
      "Rs= 500.\n",
      "hie=1.0*10**3\n",
      "hre=2.5*10**-4\n",
      "hfe=50.\n",
      "hoe=25.*10**-6\n",
      "print'%s %.2f %s'%(\"RL = \",(RL),\"ohm\")##load resistance\n",
      "print'%s %.2f %s'%(\"Rs = \",(Rs),\"ohm\")##source resistance\n",
      "##h-parameters for CE transistor amplifier are as follows:\n",
      "print'%s %.2f %s'%(\"hie = \",(hie),\"ohm\")##input resistance of CE transistor\n",
      "print'%s %.2e %s'%(\"hre = \",(hre),\"\")##voltage gain of CE transistor\n",
      "print'%s %.2f %s'%(\"hfe = \",(hfe),\"\")##current gain of CE transistor\n",
      "print'%s %.2e %s'%(\"hoe = \",(hoe),\"mho\")##output conductance of CE transistor\n",
      "\n",
      "Ai=-hfe/(1.+(hoe*RL))\n",
      "print'%s %.2f %s'%(\"Ai = -hfe/(1+(hoe*RL)) = \",(Ai),\"\")##calculation for current gain\n",
      "\n",
      "Ri = hie+(hre*Ai*RL)\n",
      "print'%s %.2f %s'%(\"Ri = hie+(hre*Ai*RL) = \",(Ri),\"ohm\")##calculation for input resistance\n",
      "\n",
      "Ais=(Ai*Rs)/(Ri+Rs)\n",
      "print'%s %.2f %s'%(\"Ais = (Ai*Rs)/(Ri+Rs)= \",(Ais),\"\")##current gain with source resistance\n",
      "\n",
      "Avs = Ai*RL/Ri\n",
      "print'%s %.2f %s'%(\"Avs = Ai*RL/Ri = \",(Avs),\"\")##voltage gain with source resistance\n",
      "\n",
      "##note : in the textbook above problem has given two values for hie BUT no value for hfe ... \n",
      "##       thus assuming hie=50 as hfe =50, as given in the previous example 8_2\n",
      "\n",
      "##note : answer in the textbook is not accuratly calculated.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "RL =  8000.00 ohm\n",
        "Rs =  500.00 ohm\n",
        "hie =  1000.00 ohm\n",
        "hre =  2.50e-04 \n",
        "hfe =  50.00 \n",
        "hoe =  2.50e-05 mho\n",
        "Ai = -hfe/(1+(hoe*RL)) =  -41.67 \n",
        "Ri = hie+(hre*Ai*RL) =  916.67 ohm\n",
        "Ais = (Ai*Rs)/(Ri+Rs)=  -14.71 \n",
        "Avs = Ai*RL/Ri =  -363.64 \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg264"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_4\n",
      "import math\n",
      "RL=5.*10**3\n",
      "Rs=1.2*10**3\n",
      "hre=2.5*10**-4\n",
      "hie=1.1*10**3\n",
      "hfe=100.\n",
      "hoe=25.*10**-6\n",
      "print'%s %.2f %s'%(\"RL = \",(RL),\"ohm\")##load resistance\n",
      "print'%s %.2f %s'%(\"Rs = \",(Rs),\"ohm\")##source resistance\n",
      "##h-parameters for CE transistor amplifier are as follows:\n",
      "print'%s %.2f %s'%(\"hie = \",(hie),\"ohm\")##input resistance of CE transistor\n",
      "print'%s %.2e %s'%(\"hre = \",(hre),\"\")##voltage gain of CE transistor\n",
      "print'%s %.2f %s'%(\"hfe = \",(hfe),\"\")##current gain of CE transistor\n",
      "print'%s %.2e %s'%(\"hoe = \",(hoe),\"mho\")##output conductance of CE transistor\n",
      "##calculation for current gain:\n",
      "Ai=-hfe/(1.+(hoe*RL))\n",
      "print'%s %.2f %s'%(\"Ai = -hfe/(1+(hoe*RL)) = \",(abs(Ai)),\"\")\n",
      "##calculation for input resistance:\n",
      "Ri = hie+(hre*Ai*RL)\n",
      "print'%s %.2f %s'%(\"Ri = hie+(hre*Ai*RL) = \",(Ri),\"ohm\")\n",
      "##calculation for voltage gain:\n",
      "Av = Ai*RL/Ri\n",
      "print'%s %.2f %s'%(\"Av = Ai*RL/Ri = \",(Av),\"\")\n",
      "##calculation for output resistance:\n",
      "Go=hoe-((hre*hfe)/(hie+Rs))\n",
      "Ro = 1./Go\n",
      "print(\"Ro = 1/Go\")\n",
      "print'%s %.2e %s'%(\"Go = hoe-((hre*hfe)/(hie+Rs)) = \",(Go),\"mho\")\n",
      "print'%s %.2f %s'%(\"Ro = \",(Ro),\"ohm\")\n",
      "\n",
      "##note : in the textbook, above problem has given two values for \"hfe\" and no value for \"hre\"... \n",
      "##        thus assuming value for \"hre = 2.5*10^-4\" as taken in previous example 8_2\n",
      "##        and \"hfe=100\" \n",
      "\n",
      "##note : in text LOAD RESISTANCE is noted as Rc in question, but RL in solution.\n",
      "##       I have work with Load Resistance with notification RL.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "RL =  5000.00 ohm\n",
        "Rs =  1200.00 ohm\n",
        "hie =  1100.00 ohm\n",
        "hre =  2.50e-04 \n",
        "hfe =  100.00 \n",
        "hoe =  2.50e-05 mho\n",
        "Ai = -hfe/(1+(hoe*RL)) =  88.89 \n",
        "Ri = hie+(hre*Ai*RL) =  988.89 ohm\n",
        "Av = Ai*RL/Ri =  -449.44 \n",
        "Ro = 1/Go\n",
        "Go = hoe-((hre*hfe)/(hie+Rs)) =  1.41e-05 mho\n",
        "Ro =  70769.23 ohm\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg264"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_5\n",
      "import math\n",
      "RL = 22.*10**3\n",
      "hfb=-0.98\n",
      "hob=7.6*10**-7\n",
      "print'%s %.2f %s'%(\"RL = \",(RL),\"ohm\")##load resistance\n",
      "print'%s %.2f %s'%(\"hfb = \",(hfb),\"\")##forward current gain in CB amplifier\n",
      "print'%s %.2e %s'%(\"hob = \",(hob),\"mho\")##output conductance in CB amplifier\n",
      "Ai = -hfb/(1.+(hob*RL))\n",
      "print'%s %.2f %s'%(\"Ai = -hfb/(1+(hob*RL)) = \",(Ai),\"\")##current gain\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "RL =  22000.00 ohm\n",
        "hfb =  -0.98 \n",
        "hob =  7.60e-07 mho\n",
        "Ai = -hfb/(1+(hob*RL)) =  0.96 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg265"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_6\n",
      "import math\n",
      "hfb = -0.999\n",
      "hib = 50.\n",
      "hob = 0.82*10**-6\n",
      "hrb = 4.*10**-6\n",
      "RL = 22.*10**3\n",
      "print'%s %.2f %s'%(\"RL = \",(RL),\"ohm\")##load impedence\n",
      "##h-parameters for CB transistor amplifier are as follows:\n",
      "print'%s %.2f %s'%(\"hib = \",(hib),\"ohm\")##input resistance of CB transistor\n",
      "print'%s %.2e %s'%(\"hrb = \",(hrb),\"\")##voltage gain of CB transistor\n",
      "print'%s %.2f %s'%(\"hfb = \",(hfb),\"\")##current gain of CB transistor\n",
      "print'%s %.2e %s'%(\"hob = \",(hob),\"mho\")##output conductance of CB transistor\n",
      "Av = -(hfb*RL)/((RL*(hib*hob-hfb*hrb))+hib)\n",
      "print'%s %.2f %s'%(\"Av = -(hfb*RL)/((RL*(hib*hob-hfb*hrb))+hib) = \",(Av),\"\")##voltage gain\n",
      "\n",
      "\n",
      "##note : answer provided in the textbook is not precised.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "RL =  22000.00 ohm\n",
        "hib =  50.00 ohm\n",
        "hrb =  4.00e-06 \n",
        "hfb =  -1.00 \n",
        "hob =  8.20e-07 mho\n",
        "Av = -(hfb*RL)/((RL*(hib*hob-hfb*hrb))+hib) =  431.03 \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg265"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_7\n",
      "import math\n",
      "RL = 1.2*10**3\n",
      "##assuming Rs = RL as given in problem\n",
      "Rs = RL\n",
      "##assuming values for h-parameters\n",
      "hie = 1.0*10**3\n",
      "hre=2.5*10**-4\n",
      "hfe = 50.\n",
      "hoe = 25.*10**-6\n",
      "print'%s %.2f %s'%(\"RL = \",(RL),\"ohm\")##load resistance\n",
      "print'%s %.2f %s'%(\"Rs = RL = \",(RL),\"ohm\")##source resistance\n",
      "##h-parameters for CE transistor amplifier are as follows:\n",
      "print'%s %.2f %s'%(\"hie = \",(hie),\"ohm\")##input resistance of CE transistor\n",
      "print'%s %.2e %s'%(\"hre = \",(hre),\"\")##voltage gain of CE transistor\n",
      "print'%s %.2f %s'%(\"hfe = \",(hfe),\"\")##current gain of CE transistor\n",
      "print'%s %.2e %s'%(\"hoe = \",(hoe),\"mho\")##output conductance of CE transistor\n",
      "##calculation for current gain:\n",
      "Ai=-hfe/(1+(hoe*RL))\n",
      "print'%s %.2f %s'%(\"Ai = -hfe/(1+(hoe*RL)) = \",(Ai),\"\")\n",
      "##calculation for input impedence:\n",
      "Ri = hie+(hre*Ai*RL)\n",
      "print'%s %.2f %s'%(\"Ri = hie+(hre*Ai*RL) = \",(Ri),\"ohm\")\n",
      "##calculation for voltage gain:\n",
      "print(\"Av = Ai*RL/Ri\")\n",
      "Av = Ai*RL/Ri\n",
      "print'%s %.2f %s'%(\"   = \",(Av),\"\")\n",
      "##calculation for output impedence:\n",
      "Ro = 1/((hoe - (hfe*hre)/(hie+Rs)))\n",
      "print(\"Ro = 1/((hoe - (hfe*hre)/(hie+Rs)))\")\n",
      "print'%s %.2f %s'%(\"     = \",(Ro),\"ohm\")\n",
      "##current gain with source impedence:\n",
      "Ais=(Ai*Rs)/(Ri+Rs)\n",
      "print'%s %.2f %s'%(\"Ais = (Ai*Rs)/(Ri+Rs)= \",(Ais),\"\")\n",
      "##voltage gain with source impedence:\n",
      "Avs = Av*Ri/(Ri+Rs)\n",
      "print'%s %.2f %s'%(\"Avs = Av*Ri/(Ri+Rs) = \",(Avs),\"\")\n",
      "\n",
      "\n",
      "\n",
      "## NOTE : calculation in the textbook for the above problem is wrong.\n",
      "##        while calculating Ri author has use \"hie = 1.2*10^3\" instead of ASSUMED9 value i.e., \"hie = 1.0*10^3\"   \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "RL =  1200.00 ohm\n",
        "Rs = RL =  1200.00 ohm\n",
        "hie =  1000.00 ohm\n",
        "hre =  2.50e-04 \n",
        "hfe =  50.00 \n",
        "hoe =  2.50e-05 mho\n",
        "Ai = -hfe/(1+(hoe*RL)) =  -48.54 \n",
        "Ri = hie+(hre*Ai*RL) =  985.44 ohm\n",
        "Av = Ai*RL/Ri\n",
        "   =  -59.11 \n",
        "Ro = 1/((hoe - (hfe*hre)/(hie+Rs)))\n",
        "     =  51764.71 ohm\n",
        "Ais = (Ai*Rs)/(Ri+Rs)=  -26.65 \n",
        "Avs = Av*Ri/(Ri+Rs) =  -26.65 \n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex8-pg267"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_8\n",
      "import math\n",
      "Ai = -60.\n",
      "hfe = 100.\n",
      "hoe = 10.*10**-6\n",
      "print'%s %.2f %s'%(\"hfe = \",(hfe),\"\")##forward current gain\n",
      "print'%s %.2e %s'%(\"hoe = \",(hoe),\"A/V\")##output conductance\n",
      "print'%s %.2f %s'%(\"Ai = \",(Ai),\"\")##current gain\n",
      "\n",
      "\n",
      "RL = -(1./hoe)*(1.+(hfe/Ai))\n",
      "RL = -(1./hoe)*(1.+(hfe/Ai))\n",
      "print'%s %.2f %s'% (\" \",(RL),\"ohm\") ##load resistance\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "hfe =  100.00 \n",
        "hoe =  1.00e-05 A/V\n",
        "Ai =  -60.00 \n",
        "  66666.67 ohm\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex9-pg267"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_9\n",
      "import math\n",
      "Ai = -60.\n",
      "Ri = 2.0*10**3\n",
      "RL = 15.*10**3\n",
      "print'%s %.2f %s'%(\"Ai = \",(Ai),\"\")##current gain\n",
      "print'%s %.2f %s'%(\"Ri = \",(Ri),\"ohm\")##input resistance\n",
      "print'%s %.2f %s'%(\"RL = \",(RL),\"ohm\")##load resistance\n",
      "Av = Ai*RL/Ri\n",
      "print'%s %.2f %s'%(\"Av = Ai*RL/Ri = \",(Av),\"\")##voltage gain\n",
      "\n",
      "##note : in textbook,\n",
      "##       author notify LOAD RESISTANCE as 'Rc' in question BUT 'RL' in solution.\n",
      "##       I have work with \"load resistance notified as RL\".\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ai =  -60.00 \n",
        "Ri =  2000.00 ohm\n",
        "RL =  15000.00 ohm\n",
        "Av = Ai*RL/Ri =  -450.00 \n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex10-pg267"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_10\n",
      "import math\n",
      "Av = -200.\n",
      "Ri = 10.*10**3\n",
      "RL = 3.*10**3\n",
      "Ai = Av*Ri/RL\n",
      "print'%s %.2f %s'%(\"Av = \",(Av),\"\")##voltage gain\n",
      "print'%s %.2f %s'%(\"Ri = \",(Ri),\"ohm\")##input resistance\n",
      "print'%s %.2f %s'%(\"RL = \",(RL),\"ohm\")##load resistance\n",
      "print'%s %.2f %s'%(\"Ai = Av*Ri/RL = \",(Ai),\"\")##current gain\n",
      "\n",
      "## note : there are mis-printring in the textbook for the above problem regading formula and notations.\n",
      "##        answer in the textbook for above problem is wrong.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Av =  -200.00 \n",
        "Ri =  10000.00 ohm\n",
        "RL =  3000.00 ohm\n",
        "Ai = Av*Ri/RL =  -666.67 \n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex11-pg267"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex8_11\n",
      "import math\n",
      "Av = -250.\n",
      "Ai = -50.\n",
      "RL = 12.*10**3\n",
      "print'%s %.2f %s'%(\"Av = \",(Av),\"\")##voltage gain\n",
      "print'%s %.2f %s'%(\"Ai = \",(Ai),\"\")##current gain\n",
      "print'%s %.2f %s'%(\"RL = \",(RL),\"ohm\")##load resistance\n",
      "Ri = Ai*RL/Av\n",
      "print'%s %.2f %s'%(\"Ri = Ai*RL/Av = \",(Ri),\"ohm\")##input resistance\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Av =  -250.00 \n",
        "Ai =  -50.00 \n",
        "RL =  12000.00 ohm\n",
        "Ri = Ai*RL/Av =  2400.00 ohm\n"
       ]
      }
     ],
     "prompt_number": 11
    }
   ],
   "metadata": {}
  }
 ]
}