summaryrefslogtreecommitdiff
path: root/Electrical_Circuit_Theory_And_Technology/chapter_06-checkpoint_1.ipynb
diff options
context:
space:
mode:
authorhardythe12014-07-25 12:35:04 +0530
committerhardythe12014-07-25 12:35:04 +0530
commit6846da7f30aadc7b3812538d1b1c9ef2e465a922 (patch)
tree0ac5e382d6515013c6a1f23d3529dc46e03d0015 /Electrical_Circuit_Theory_And_Technology/chapter_06-checkpoint_1.ipynb
parentdccd504f6bd2f5e97c54d1f0b0d2a99f83497ce5 (diff)
downloadPython-Textbook-Companions-6846da7f30aadc7b3812538d1b1c9ef2e465a922.tar.gz
Python-Textbook-Companions-6846da7f30aadc7b3812538d1b1c9ef2e465a922.tar.bz2
Python-Textbook-Companions-6846da7f30aadc7b3812538d1b1c9ef2e465a922.zip
removing unwanted:
Diffstat (limited to 'Electrical_Circuit_Theory_And_Technology/chapter_06-checkpoint_1.ipynb')
-rwxr-xr-xElectrical_Circuit_Theory_And_Technology/chapter_06-checkpoint_1.ipynb873
1 files changed, 0 insertions, 873 deletions
diff --git a/Electrical_Circuit_Theory_And_Technology/chapter_06-checkpoint_1.ipynb b/Electrical_Circuit_Theory_And_Technology/chapter_06-checkpoint_1.ipynb
deleted file mode 100755
index 772a8bc5..00000000
--- a/Electrical_Circuit_Theory_And_Technology/chapter_06-checkpoint_1.ipynb
+++ /dev/null
@@ -1,873 +0,0 @@
-{
- "metadata": {
- "name": ""
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h1>Chapter 6: Capacitors and capacitance</h1>"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 1, page no. 58</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#(a) Determine the p.d. across a 4 \u03bcF capacitor when charged with 5 mC.\n",
- "# (b) Find the charge on a 50 pF capacitor when the voltage applied to it is 2 kV.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "C1 = 4E-6;# in Farad\n",
- "C2 = 50E-12;# in Farad\n",
- "Q1 = 5E-3;# in Coulomb\n",
- "V2 = 2000;# in volts\n",
- "\n",
- "#calculation:\n",
- "V1 = Q1/C1\n",
- "Q2 = C2*V2\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)P.d \",V1,\" Volts(V)\\n\"\n",
- "print \"\\n (b)Charge(Q) \",(Q2/1E-6),\" micro-Coulomb\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)P.d 1250.0 Volts(V)\n",
- "\n",
- "\n",
- " (b)Charge(Q) 0.1 micro-Coulomb"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 2, page no. 58</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Determine the pd between the plates.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "I = 4;# in amperes\n",
- "C = 20E-6;# in Farad\n",
- "t = 3E-3;# in sec\n",
- "\n",
- "#calculation:\n",
- "Q = I*t\n",
- "V = Q/C\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)P.d \",V,\" Volts(V)\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)P.d 600.0 Volts(V)"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 3, page no. 59</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Calculate how long the capacitor can provide an average discharge current of 2 mA.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "I = 2E-3;# in amperes\n",
- "C = 5E-6;# in Farad\n",
- "V = 800;# in volts\n",
- "\n",
- "#calculation:\n",
- "Q = C*V\n",
- "t = Q/I\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n capacitor can provide an average discharge current for \",t,\" Sec\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " capacitor can provide an average discharge current for 2.0 Sec"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 4, page no. 60</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Calculate the electric flux density.\n",
- "#determine the electric field strength.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "Q = 0.2E-6;# in Coulomb\n",
- "A = 800E-4;# in m2\n",
- "d = 0.005;# in m\n",
- "V = 250;# in Volts\n",
- "\n",
- "#calculation:\n",
- "D = Q/A\n",
- "E = V/d\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)Electric flux density D \",(D/1E-6),\" uC/m2\\n\"\n",
- "print \"\\n (b)Electric field strength E \",(E/1000),\" kV/m\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)Electric flux density D 2.5 uC/m2\n",
- "\n",
- "\n",
- " (b)Electric field strength E 50.0 kV/m"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 5, page no. 60</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find the voltage gradient between the plates.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "D = 2E-6;# in micro-C/m2\n",
- "e0 = 8.85E-12;# in F/m\n",
- "er = 5;\n",
- "\n",
- "#calculation:\n",
- "E = D/(e0*er)\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n Electric field strength E \",round((E/1000),2),\" kV/m\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " Electric field strength E 45.2 kV/m"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 6, page no. 60</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#What is the electric field strength?\n",
- "#Find also the flux density when the dielectric between the plates is\n",
- "#(a) air, and (b) polythene of relative permittivity 2.3\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "d = 0.8E-3;# in m\n",
- "e0 = 8.85E-12;# in F/m\n",
- "era = 1;# for air\n",
- "erp = 2.3;# for polythene\n",
- "V =200;# in Volts\n",
- "\n",
- "#calculation:\n",
- "E = V/d\n",
- "#for air\n",
- "Da = E*e0*era\n",
- "#for polythene\n",
- "Dp = E*e0*erp\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)Electric flux density for air \",round((Da/1E-6),2),\" micro-C/m2\\n\"\n",
- "print \"\\n (b)Electric flux density for polythene \",round((Dp/1E-6),2),\" micro-C/m2\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)Electric flux density for air 2.21 micro-C/m2\n",
- "\n",
- "\n",
- " (b)Electric flux density for polythene 5.09 micro-C/m2"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 7, page no. 62</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#(a)Calculate the capacitance of the capacitor in picofarads. \n",
- "#(b)what will be the pd between the plates?\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "A = 4E-4;# in m2\n",
- "d = 0.1E-3;# in m\n",
- "e0 = 8.85E-12;# in F/m\n",
- "er = 100;\n",
- "Q = 1.2E-6;# in coulomb\n",
- "\n",
- "#calculation:\n",
- "C = e0*er*A/d\n",
- "V = Q/C\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)Capacitance \",(C/1E-12),\" pF\\n\"\n",
- "print \"\\n (b)P.d.= \",round(V,2),\" Volts(V)\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)Capacitance 3540.0 pF\n",
- "\n",
- "\n",
- " (b)P.d.= 338.98 Volts(V)"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 8, page no. 62</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#determine the effective thickness of the paper if its relative permittivity is 2.5\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "A = 800E-4;# in m2\n",
- "C = 4425E-12;# in Farads\n",
- "e0 = 8.85E-12;# in F/m\n",
- "er = 2.5;\n",
- "\n",
- "#calculation:\n",
- "d = e0*er*A/C\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n Thickness \",(d/1E-3),\" mm\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " Thickness 0.4 mm"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 9, page no. 62</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the capacitance of the capacitor.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "n = 19;# no. of plates\n",
- "L = 75E-3;# in m\n",
- "B = 75E-3;# in m\n",
- "d = 0.2E-3;# in m\n",
- "e0 = 8.85E-12;# in F/m\n",
- "er = 5;\n",
- "#calculation:\n",
- "A = L*B\n",
- "C = e0*er*A*(n-1)/d\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n Capacitance \",round((C/1E-9),2),\" nF\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " Capacitance 22.4 nF"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 10, page no. 65</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Calculate the equivalent capacitance of two capacitors of 6 \u03bcF and 4 \u03bcF connected (a) in parallel and (b) in series\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "C1 = 6E-6;# in Farads\n",
- "C2 = 4E-6;# in Farads\n",
- "\n",
- "#calculation:\n",
- "# in Parallel\n",
- "Cp = C1 + C2\n",
- "# in Series\n",
- "Cs = 1/((1/C1) + (1/C2))\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)Capacitance in parallel \",(Cp/1E-6),\" uF\\n\"\n",
- "print \"\\n (b)Capacitance in Series \",(Cs/1E-6),\" uF\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)Capacitance in parallel 10.0 uF\n",
- "\n",
- "\n",
- " (b)Capacitance in Series 2.4 uF"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 11, page no. 65</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#What capacitance must be connected in series\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "C1 = 30E-6;# in Farads\n",
- "Cs = 12E-6;# in Farads\n",
- "\n",
- "#calculation:\n",
- "# in Series\n",
- "C2 = 1/((1/Cs) - (1/C1))\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)Capacitance in series \",(C2/1E-6),\" uF\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)Capacitance in series 20.0 uF"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 12, page no. 65</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Determine (a) the equivalent circuit capacitance, \n",
- "#(b) the total charge and\n",
- "#(c) the charge on each capacitor\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "C1 = 1E-6;# in Farads\n",
- "C2 = 3E-6;# in Farads\n",
- "C3 = 5E-6;# in Farads\n",
- "C4 = 6E-6;# in Farads\n",
- "Vt = 100;# in Volts\n",
- "\n",
- "#calculation:\n",
- "# in Parallel\n",
- "Cp = C1 + C2 + C3 + C4\n",
- "Qt = Vt*Cp\n",
- "Q1 = C1*Vt\n",
- "Q2 = C2*Vt\n",
- "Q3 = C3*Vt\n",
- "Q4 = C4*Vt\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)Equivalent Capacitance in Parallel \",(Cp/1E-6),\" uF\\n\"\n",
- "print \"\\n (b)Total charge \",(Qt/1E-3),\" mC\\n\"\n",
- "print \"\\n (c)Charge on each capacitors (C1, C2, C3, C4)\\n \",(Q1/1E-3),\", \",(Q2/1E-3),\", \"\n",
- "print \",(Q3/1E-3),\", \",(Q4/1E-3),\" mC respectively\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "ename": "SyntaxError",
- "evalue": "invalid syntax (<ipython-input-1-0c99632e8192>, line 27)",
- "output_type": "pyerr",
- "traceback": [
- "\u001b[1;36m File \u001b[1;32m\"<ipython-input-1-0c99632e8192>\"\u001b[1;36m, line \u001b[1;32m27\u001b[0m\n\u001b[1;33m print \",(Q3/1E-3),\", \",(Q4/1E-3),\" mC respectively\\n\"\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 13, page no. 66</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Calculate (a) the equivalent circuit capacitance, \n",
- "#(b) the charge on each capacitor and\n",
- "#(c) the pd across each capacitor.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "C1 = 3E-6;# in Farads\n",
- "C2 = 6E-6;# in Farads\n",
- "C3 = 12E-6;# in Farads\n",
- "Vt = 350;# in Volts\n",
- "#calculation:\n",
- "# in series\n",
- "Cs = 1/((1/C1) + (1/C2) + (1/C3))\n",
- "Qt = Vt*Cs\n",
- "V1 = Qt/C1\n",
- "V2 = Qt/C2\n",
- "V3 = Qt/C3\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)Equivalent Capacitance in Series \",(Cs/1E-6),\" uF\\n\"\n",
- "print \"\\n (b)Charge on each capacitors (C1, C2, C3) \",(Qt/1E-3),\" mC \\n\"\n",
- "print \"\\n (b)P.d Across each capacitors (C1, C2, C3)\\n \",V1,\" V, \", V2,\" V, \", V3,\" V respectively\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)Equivalent Capacitance in Series 1.71428571429 uF\n",
- "\n",
- "\n",
- " (b)Charge on each capacitors (C1, C2, C3) 0.6 mC \n",
- "\n",
- "\n",
- " (b)P.d Across each capacitors (C1, C2, C3)\n",
- " 200.0 V, 100.0 V, 50.0 V respectively"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 14, page no. 67</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find (a) the thickness of the mica needed, and \n",
- "#(b) the area of a plate assuming a two-plate construction.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "C = 0.2E-6;# in Farads\n",
- "V = 1250;# in Volts\n",
- "E = 50E6# in V/m\n",
- "e0 = 8.85E-12;# in F/m\n",
- "er = 6;\n",
- "\n",
- "#calculation:\n",
- "d = V/E\n",
- "A = C*d/e0/er\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)Thickness \",(d/1E-3),\" mm\\n\"\n",
- "print \"\\n (b)Area of plate is \",round((A/1E-4),2),\" cm^2 \\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)Thickness 0.025 mm\n",
- "\n",
- "\n",
- " (b)Area of plate is 941.62 cm^2 "
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 15, page no. 68</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#(a) Determine the energy stored in a 3 \u03bcF capacitor when charged to 400 V.\n",
- "#(b) Find also the average power developed if this energy is dissipated in a time of 10 \u03bcs\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "C = 3E-6;# in Farads\n",
- "V = 400;# in Volts\n",
- "t = 10E-6;# in secs\n",
- "\n",
- "#calculation:\n",
- "W = C*V*V/2\n",
- "P = W/t\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)Energy stored \",W,\" J\\n\"\n",
- "print \"\\n (b)Power developed \",(P/1E3),\" kW \\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)Energy stored 0.24 J\n",
- "\n",
- "\n",
- " (b)Power developed 24.0 kW "
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 16, page no. 68</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Find the pd to which the capacitor must be charged.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "C = 12E-6;# in Farads\n",
- "W = 4;# in Joules\n",
- "\n",
- "#calculation:\n",
- "V = (2*W/C)**0.5\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n P.d \",round(V,2),\" V\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " P.d 816.5 V"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "<h3>Example 17, page no. 68</h3>"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#find (a) the voltage and (b) the capacitance.\n",
- "from __future__ import division\n",
- "import math\n",
- "#initializing the variables:\n",
- "W = 1.2;# in Joules\n",
- "Q = 10E-3;# in Coulomb\n",
- "\n",
- "#calculation:\n",
- "V = 2*W/Q\n",
- "C = Q/V\n",
- "\n",
- "#Results\n",
- "print \"\\n\\nResult\\n\\n\"\n",
- "print \"\\n (a)P.d \",V,\" V\\n\"\n",
- "print \"\\n (b)Capacitance \",round((C/1E-6),2),\" uF\\n\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- "\n",
- "Result\n",
- "\n",
- "\n",
- "\n",
- " (a)P.d 240.0 V\n",
- "\n",
- "\n",
- " (b)Capacitance 41.67 uF"
- ]
- }
- ],
- "prompt_number": 19
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file