diff options
Diffstat (limited to 'sample_notebooks/RuchiMittal/RuchiMittal_version_backup')
-rwxr-xr-x | sample_notebooks/RuchiMittal/RuchiMittal_version_backup/chap1.ipynb | 412 | ||||
-rwxr-xr-x | sample_notebooks/RuchiMittal/RuchiMittal_version_backup/chapter1.ipynb | 543 |
2 files changed, 955 insertions, 0 deletions
diff --git a/sample_notebooks/RuchiMittal/RuchiMittal_version_backup/chap1.ipynb b/sample_notebooks/RuchiMittal/RuchiMittal_version_backup/chap1.ipynb new file mode 100755 index 00000000..c87721c5 --- /dev/null +++ b/sample_notebooks/RuchiMittal/RuchiMittal_version_backup/chap1.ipynb @@ -0,0 +1,412 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0634d7bf5367e0141c25c22bd055ab7dd0d67262eacfb1ab474c7c9ba196985e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 Qualities of measurments"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page no 3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "V=80.0 #expected value of voltage in Volts\n",
+ "V1=79 #Volts\n",
+ "\n",
+ "#Calculation\n",
+ "E=V-V1\n",
+ "E1=((V-V1)/V)*100\n",
+ "E2=1-((V-V1)/V)\n",
+ "A=100*E2\n",
+ "#Result\n",
+ "print\"(i) Absolute error is \",E,\"V\"\n",
+ "print\"(ii) percent error is \", E1,\"%\"\n",
+ "print\"(iii) reletive error is \", E2\n",
+ "print\"(iv) percent of accuracy is \", A,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Absolute error is 1.0 V\n",
+ "(ii) percent error is 1.25 %\n",
+ "(iii) reletive error is 0.9875\n",
+ "(iv) percent of accuracy is 98.75 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page no 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "x1=98\n",
+ "x2=101\n",
+ "x3=102\n",
+ "x4=97\n",
+ "x5=101\n",
+ "x6=100\n",
+ "x7=103\n",
+ "x8=98\n",
+ "x9=106\n",
+ "x10=99\n",
+ "\n",
+ "#Calculation\n",
+ "X=(x1+x2+x3+x4+x5+x6+x7+x8+x9+x10)/10.0\n",
+ "P=(x6/X)\n",
+ "\n",
+ "#Result\n",
+ "print\"Precision of the 6th measurment is \",round(P,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Precision of the 6th measurment is 0.995\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3(a) Page no 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "V=80 #milliammeter readings\n",
+ "I=10.0 #mA\n",
+ "V1=150 #Volts\n",
+ "R1=1000 #ohm/volt\n",
+ "\n",
+ "#Calculation\n",
+ "R=V/I\n",
+ "Rv=R1*V1\n",
+ "Rx=(R*V1)/(V1-R)\n",
+ "E=((Rx-R)/Rx)*100\n",
+ "\n",
+ "#Result\n",
+ "print\"(i) Apparent resistance of the unknown resistance \",R,\"K ohm\"\n",
+ "print \"Actual resistance of the unknown resistance is \",round(Rx,2),\"K ohm\"\n",
+ "print \"Error due to the loading effet of the voltmeter \",round(E,1),\"%\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Apparent resistance of the unknown resistance 8.0 K ohm\n",
+ "Actual resistance of the unknown resistance is 8.45 K ohm\n",
+ "Error due to the loading effet of the voltmeter 5.3 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 104
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3(b) Page no 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "V=30 #Volts\n",
+ "V1=150 #Volts\n",
+ "I=0.6 #A\n",
+ "R1=1000 #ohm/volts\n",
+ "\n",
+ "#Calculation\n",
+ "R=V/I\n",
+ "Rv=(R1*V1)\n",
+ "Rx=(R*Rv)/(Rv-R)\n",
+ "E=((Rx-R)/Rx)*100\n",
+ "\n",
+ "#Result\n",
+ "print\"(i) total circuit resistance is \", R,\"ohm\"\n",
+ "print \"(ii) The voltmeter resistance is \",round(Rx,2)\n",
+ "print\"(iii) Error due to loading effect of voltmeter \", round(E,3),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) total circuit resistance is 50.0 ohm\n",
+ "(ii) The voltmeter resistance is 50.02\n",
+ "(iii) Error due to loading effect of voltmeter 0.033 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 113
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4 Page no 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "x1=49.7\n",
+ "x2=50.1\n",
+ "x3=50.2\n",
+ "x4=49.6\n",
+ "x5=49.7\n",
+ "\n",
+ "#Calculation\n",
+ "X=(x1+x2+x3+x4+x5)/5.0\n",
+ "d1=x1-X\n",
+ "d2=x2-X\n",
+ "d3=x3-X\n",
+ "d4=x4-X\n",
+ "d5=x5-X\n",
+ "dtotal=(d1+d2+d3+d4+d5)\n",
+ "\n",
+ "#Result\n",
+ "print\"(i) Arithmetic mean is \", X\n",
+ "print\"(ii) derivations from each value are\"\n",
+ "print \"d1=\",d1,\"\\nd2=\",d2,\"\\nd3=\",d3,\"\\nd4=\",d4,\"\\nd5=\",d5\n",
+ "print\"(iii) The algebric sum of derivative is \",round(dtotal,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Arithmetic mean is 49.86\n",
+ "(ii) derivations from each value are\n",
+ "d1= -0.16 \n",
+ "d2= 0.24 \n",
+ "d3= 0.34 \n",
+ "d4= -0.26 \n",
+ "d5= -0.16\n",
+ "(iii) The algebric sum of derivative is 0.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page no 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "x1=49.7\n",
+ "x2=50.1\n",
+ "x3=50.2\n",
+ "x4=49.6\n",
+ "x5=49.7\n",
+ "\n",
+ "#Calculation\n",
+ "X=(x1+x2+x3+x4+x5)/5.0\n",
+ "d1=x1-X\n",
+ "d2=x2-X\n",
+ "d3=x3-X\n",
+ "d4=x4-X\n",
+ "d5=x5-X\n",
+ "dtotal=(d1+d2+d3+d4+d5)/5.0\n",
+ "\n",
+ "#Result\n",
+ "print\"The average deviation is \",round(dtotal*10**14,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average deviation is 0.284\n"
+ ]
+ }
+ ],
+ "prompt_number": 86
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6 Page no 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "d1= -0.16 \n",
+ "d2= 0.24 \n",
+ "d3= 0.34 \n",
+ "d4= -0.26 \n",
+ "d5= -0.16\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "D=math.sqrt((d1**2+d2**2+d3**2+d4**2+d5**2)/4.0)\n",
+ "print\"The standard deviation is \",round(D,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The standard deviation is 0.27\n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7 Page no 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "V=600 #Volts\n",
+ "V1=250.0 #Volts\n",
+ "a=0.02\n",
+ "\n",
+ "#Calculation\n",
+ "M=a*V\n",
+ "E=(M/V1)*100\n",
+ "\n",
+ "#Result\n",
+ "print\"The limited error is \", E,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The limited error is 4.8 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 94
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8 Page no 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "V=70.0 #Volts\n",
+ "V1=100 #Volts\n",
+ "I=80.0 #mA\n",
+ "I1=150 #mA\n",
+ "a=0.015\n",
+ "\n",
+ "#calculation\n",
+ "M=a*V1\n",
+ "E=(M/V)*100\n",
+ "E1=a*I1\n",
+ "E2=(E1/I)*100\n",
+ "E3=E+E2\n",
+ "\n",
+ "#Result\n",
+ "print\"limiting error is \",round (E3,3),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "limiting error is 4.955 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 102
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/RuchiMittal/RuchiMittal_version_backup/chapter1.ipynb b/sample_notebooks/RuchiMittal/RuchiMittal_version_backup/chapter1.ipynb new file mode 100755 index 00000000..f6180b5a --- /dev/null +++ b/sample_notebooks/RuchiMittal/RuchiMittal_version_backup/chapter1.ipynb @@ -0,0 +1,543 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9880f2d8505e271317a099910ead6c2116ce86fa0e83f56feb35ac33a1b96b23"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 Electric charge"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page no 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "q=4.5*10**-19 #C\n",
+ "e=1.6*10**-19 #C\n",
+ "\n",
+ "#Calculation\n",
+ "n=q/e\n",
+ "\n",
+ "#Result\n",
+ "print\"n= \",round(n,1),\"This value of charge is not possible\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n= 2.8 This value of charge is not possible\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page no 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "q=3.2*10**-7 #C\n",
+ "e=1.6*10**-19 #C\n",
+ "\n",
+ "#Calculation\n",
+ "n=q/e\n",
+ "\n",
+ "#Result\n",
+ "print\"The required number of electrons is \",n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required number of electrons is 2e+12\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3 Page no 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "q=19.2*10**-19\n",
+ "e=1.6*10**-19\n",
+ "me=9*10**-31 #Kg\n",
+ "\n",
+ "#Calculation\n",
+ "n=q/e\n",
+ "M=n*me\n",
+ "\n",
+ "#Result\n",
+ "print\"(i) The value of n=\",n,\"\\n(ii) Charge on silk=\",-q*10**19,\"*10**-19\"\n",
+ "print\"(iii) Mass=\",M,\"Therefore mass transferred is negligibly small\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The value of n= 12.0 \n",
+ "(ii) Charge on silk= -19.2 *10**-19\n",
+ "(iii) Mass= 1.08e-29 Therefore mass transferred is negligibly small\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4 Page no 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "a=16\n",
+ "n=6.023*10**23 #C\n",
+ "\n",
+ "#Calculation\n",
+ "W=2+a\n",
+ "A=((n*100)/W)*10\n",
+ "\n",
+ "#Result\n",
+ "print\"Total number of electrons in 100 g of water \", round(A,-23)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total number of electrons in 100 g of water 3.35e+25\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page no 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "n=10**9\n",
+ "e=1.6*10**-19 #C\n",
+ "Q=1\n",
+ "\n",
+ "#Calculation\n",
+ "q=n*e\n",
+ "t=Q/q\n",
+ "\n",
+ "#Result\n",
+ "print (t*10**-9),\"10**9 S\"\n",
+ "print\"Time required is about 198 years\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "6.25 10**9 S\n",
+ "Time required is about 198 years\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6 Page no 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "q1=20 #micro C\n",
+ "q2=-5 #micro C\n",
+ "a=9*10**9\n",
+ "r=0.1 \n",
+ "\n",
+ "#Calculation\n",
+ "q=q1+q2\n",
+ "q3=q/2.0\n",
+ "F=(a*q3*q3)/r**2\n",
+ "\n",
+ "#Result\n",
+ "print\"Force is \",round(F*10**-13,3),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force is 5.062 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Example 1.10 Page no 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "m=9*10**9\n",
+ "q=5*10**-6\n",
+ "r=0.1\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "F=(m*q*q)/r**2\n",
+ "C=2*F*math.cos(30)*(180/3.14)\n",
+ "\n",
+ "#Result\n",
+ "print\"Force on each charge is \", round(C,1)*10**-1,\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force on each charge is 39.79 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.11 Page no 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "m=9*10**9\n",
+ "q=1\n",
+ "r=0.24\n",
+ "A=20\n",
+ "B=12.0\n",
+ "m1=10**-4\n",
+ "g=9.8\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "F=(m*q**2)/r**2\n",
+ "AD=math.sqrt(A**2-B**2)\n",
+ "C=AD/B\n",
+ "F1=(1/C)*m1*g\n",
+ "Q=math.sqrt(F1/F)\n",
+ "\n",
+ "#Result\n",
+ "print\"Charge on each sphere\", round(Q*10**8,1),\"10**-8\",\"C\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Charge on each sphere 6.9 10**-8 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.12 Page no 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "F=3.7*10**-9 #C\n",
+ "q=1.6*10**-19 #c\n",
+ "m=9*10**9\n",
+ "r=5*10**-10\n",
+ "\n",
+ "#Calculation \n",
+ "import math\n",
+ "n=math.sqrt(F*r**2/(m*q**2))\n",
+ "\n",
+ "#Result\n",
+ "print round(n,0),\"electrons are missing from each icon\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "2.0 electrons are missing from each icon\n"
+ ]
+ }
+ ],
+ "prompt_number": 82
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.14 Page no 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "e=1.6*10**-19\n",
+ "m=9*10**9\n",
+ "G=6.67*10**-11\n",
+ "me=9.11*10**-31\n",
+ "mp=1.67*10**-27\n",
+ "r=10**-10\n",
+ "\n",
+ "#Calculation\n",
+ "F0=(m*e**2)/(G*me*mp)\n",
+ "F1=(m*e**2)/(G*mp*mp)\n",
+ "F2=m*e**2/r**2\n",
+ "A1=F2/me\n",
+ "A2=F2/mp\n",
+ "\n",
+ "#Result\n",
+ "print\"(a)(i)strength of an electrons and protons\", round(F0*10**-39,1)*10**39\n",
+ "print\" (ii)Strength of two protons \",round(F1*10**-36,1)*10**36\n",
+ "print\"(b) Acceleration of electron is \",round(A1*10**-22,1)*10**22,\"m/s**2\"\n",
+ "print\" Acceleration of proton is \",round(A2*10**-19,1)*10**19,\"m/s*2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)(i)strength of an electrons and protons 2.3e+39\n",
+ " (ii)Strength of two protons 1.2e+36\n",
+ "(b) Acceleration of electron is 2.5e+22 m/s**2\n",
+ " Acceleration of proton is 1.4e+19 m/s*2\n"
+ ]
+ }
+ ],
+ "prompt_number": 112
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.16 Page no 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "m=9*10**9 #C\n",
+ "q1=10*10**-6\n",
+ "q2=5*10**-6\n",
+ "r=0.05\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "F1=m*q1*q2/r**2\n",
+ "F2=m*q1*q2/r**2\n",
+ "F3=math.sqrt(F1**2+F2**2+(2*F1*F2*math.cos(120)*180/3.14))\n",
+ "\n",
+ "#Result\n",
+ "print\"Resultant charge is \", round(F3*10**-1,0),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resultant charge is 176.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 132
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.17 Page no 20 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "m=9*10**9\n",
+ "q1=1.2*10**-8\n",
+ "q2=1\n",
+ "r=0.03\n",
+ "r1=0.04\n",
+ "q3=1.6*10**-8\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "F1=m*q1*q2/r**2\n",
+ "F2=m*q3*q2/r1**2\n",
+ "F3=math.sqrt(F1**2+F2**2)\n",
+ "\n",
+ "#Result\n",
+ "print\"Total force is \", F3*10**-5,\"10**5\",\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total force is 1.5 10**5 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 149
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.18 Page no 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "m=9*10**9\n",
+ "q1=1\n",
+ "q2=100\n",
+ "r=10\n",
+ "q3=75 #C\n",
+ "r1=5\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "F=m*q1*q2/r**2 #along BA\n",
+ "F1=m*q1*q2/r**2 #along AC\n",
+ "F2=m*q3/(math.sqrt(r**2-r1**2)**2)\n",
+ "F3=math.sqrt(F1**2+F2**2)\n",
+ "X=F1/F2\n",
+ "\n",
+ "#Result\n",
+ "print\"Force experienced by 1 C Charge is \",round(F3*10**-9,2),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force experienced by 1 C Charge is 12.73 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 168
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |