diff options
author | hardythe1 | 2015-06-03 15:27:17 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-03 15:27:17 +0530 |
commit | 47d7279a724246ef7aa0f5359cf417992ed04449 (patch) | |
tree | c613e5e4813d846d24d67f46507a6a69d1a42d87 /sample_notebooks/Akshay Ghogare | |
parent | 435840cef00c596d9e608f9eb2d96f522ea8505a (diff) | |
download | Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.tar.gz Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.tar.bz2 Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.zip |
add books
Diffstat (limited to 'sample_notebooks/Akshay Ghogare')
-rwxr-xr-x | sample_notebooks/Akshay Ghogare/AKSHAY_GHOGARE.ipynb | 249 | ||||
-rwxr-xr-x | sample_notebooks/Akshay Ghogare/AKSHAY_GHOGARE_1.ipynb | 274 |
2 files changed, 523 insertions, 0 deletions
diff --git a/sample_notebooks/Akshay Ghogare/AKSHAY_GHOGARE.ipynb b/sample_notebooks/Akshay Ghogare/AKSHAY_GHOGARE.ipynb new file mode 100755 index 00000000..fa395760 --- /dev/null +++ b/sample_notebooks/Akshay Ghogare/AKSHAY_GHOGARE.ipynb @@ -0,0 +1,249 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:4b26d5a062c7df178b102bcb49ca0f8363642f2c290f44d66b774e90f3dc8f59" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "SAMPLE EXAMPLE 1" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=12.5;#CaCO3 in water in mg/lit#\n", + "W2=8.4;#MgCO3 in water in mg/lit#\n", + "W3=22.2;#CaCl2 in water in mg/lit#\n", + "W4=9.5;#MgCl2 in water in mg/lit#\n", + "W5=33;#CO2 in water in mg/lit#\n", + "W6=6.68;#NaHCO3 in water in mg/lit#\n", + "M1=100.0/100.0;#multiplication factor of CaCO3#\n", + "M2=100.0/84;#multiplication factor of MgCO3#\n", + "M3=100.0/111;#multiplication factor of CaCl2#\n", + "M4=100.0/95;#multiplication factor of MgCl2#\n", + "M6=100.0/84;#multiplication factor of NaHCO3#\n", + "P1=W1*M1;#CaCO3 in terms of CaCO3#\n", + "P2=W2*M2;#MgCO3 in terms of CaCO3#\n", + "P3=W3*M3;#CaCl2 in terms of CaCO3#\n", + "P4=W4*M4;#MgCl2 in terms of CaCO3#\n", + "P6=W6*M6;#NaHCO3 in terms of CaCO3#\n", + "print\"We do not take CO2 since it does not contribute to hardness \" ;\n", + "C=P1+P2+P6;\n", + "print\" Carbonate hardness is\",C,\"mg/l or ppm\";\n", + "NC=P3+P4;\n", + "print\" Non Carbonate hardness is\",NC,\"mg/l or ppm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We do not take CO2 since it does not contribute to hardness \n", + " Carbonate hardness is 30.4523809524 mg/l or ppm\n", + " Non Carbonate hardness is 30.0 mg/l or ppm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=40.5;\n", + "W2=33.3;\n", + "W3=41;\n", + "W4=101;\n", + "W5=33.6;\n", + "M1=100.0/162;\n", + "M2=100.0/111;\n", + "M3=100.0/164;\n", + "M5=100.0/84;\n", + "P1=W1*M1;\n", + "P2=W2*M2;\n", + "P3=W3*M3;\n", + "P5=W5*M5;\n", + "print \"We do not take KNO3 since it does not contribute to hardness \"\n", + "C=P1+P5;\n", + "print \"Carbonate hardness is\",C,\" mg/l or ppm\"\n", + "NC=P2+P3;\n", + "print \"Non Carbonate hardness is\",NC,\" mg/l or ppm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We do not take KNO3 since it does not contribute to hardness \n", + "Carbonate hardness is 65.0 mg/l or ppm\n", + "Non Carbonate hardness is 55.0 mg/l or ppm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=29.1;#Mg(HCO3 2 in water in mg/lit#\n", + "W2=40.5;#Ca(HCO3 2 in water in mg/lit#\n", + "W3=11.1;#CaCl2 in water in mg/lit#\n", + "W4=15.82;#MgCl2 in water in mg/lit#\n", + "W5=28.5;#NaCl in water in mg/lit#\n", + "W6=22.0;#CO2 in water in mg/lit#\n", + "M1=100.0/146.007;#multiplication factor of Mg(HCO3 2#\n", + "M2=100.0/162;#multiplication factor of Ca(HCO3 2#\n", + "M3=100.0/111;#multiplication factor of CaCl2#\n", + "M4=100.0/95.005;#multiplication factor of MgCl2#\n", + "P1=W1*M1;#Mg(HCO3 2 in terms of CaCO3#\n", + "P2=W2*M2;#Ca(HCO3 2 in terms of CaCO3#\n", + "P3=W3*M3;#CaCl2 in terms of CaCO3#\n", + "P4=W4*M4;#MgCl2 in terms of CaCO3#\n", + "print\"We do not take NaCl and CO2 since they do not contribute to hardness \" ;\n", + "C=P1+P2;\n", + "print\" Carbonate hardness is\",C,\"mg/l or ppm\";\n", + "NC=P3+P4;\n", + "print\" Non Carbonate hardness is\",NC,\"mg/l or ppm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=16.2;#Ca(HCO3 2 in water in mg/lit#\n", + "W2=14.6;#Mg(HCO3 2 in water in mg/lit#\n", + "W3=9.5;#MgCl2 in water in mg/lit#\n", + "W4=48;#MgSO4 in water in mg/lit#\n", + "W5=12;#KCl in water in mg/lit#\n", + "M1=100.0/162;#multiplication factor of Ca(HCO3 2#\n", + "M2=100.0/146;#multiplication factor of Mg(HCO3 2 #\n", + "M3=100.0/95;#multiplication factor of MgCl2#\n", + "M4=100.0/120;#multiplication factor of MgSO4#\n", + "P1=W1*M1;#Ca(HCO3 2 in terms of CaCO3#\n", + "P2=W2*M2;#Mg(HCO3 2 in terms of CaCO3#\n", + "P3=W3*M3;#MgCl2 in terms of CaCO3#\n", + "P4=W4*M4;#MgSO4 in terms of CaCO3#\n", + "print\"We do not take KCl since it does not contribute to hardness \" ;\n", + "C=P1+P2;\n", + "print\" Carbonate hardness is\",C,\"mg/l or ppm\";\n", + "NC=P3+P4;\n", + "print\" Non Carbonate hardness is\",NC,\"mg/l or ppm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=16.2;#Ca(HCO3 2 in water in mg/lit#\n", + "W2=14.6;#Mg(HCO3 2 in water in mg/lit#\n", + "W3=9.5;#MgCl2 in water in mg/lit#\n", + "W4=48;#MgSO4 in water in mg/lit#\n", + "W5=12;#KCl in water in mg/lit#\n", + "M1=100.0/162;#multiplication factor of Ca(HCO3 2#\n", + "M2=100.0/146;#multiplication factor of Mg(HCO3 2 #\n", + "M3=100.0/95;#multiplication factor of MgCl2#\n", + "M4=100.0/120;#multiplication factor of MgSO4#\n", + "P1=W1*M1;#Ca(HCO3 2 in terms of CaCO3#\n", + "P2=W2*M2;#Mg(HCO3 2 in terms of CaCO3#\n", + "P3=W3*M3;#MgCl2 in terms of CaCO3#\n", + "P4=W4*M4;#MgSO4 in terms of CaCO3#\n", + "print\"We do not take KCl since it does not contribute to hardness \" ;\n", + "C=P1+P2;\n", + "print\" Carbonate hardness is\",C,\"mg/l or ppm\";\n", + "NC=P3+P4;\n", + "print\" Non Carbonate hardness is\",NC,\"mg/l or ppm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We do not take KCl since it does not contribute to hardness \n", + " Carbonate hardness is 20.0 mg/l or ppm\n", + " Non Carbonate hardness is 50.0 mg/l or ppm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/Akshay Ghogare/AKSHAY_GHOGARE_1.ipynb b/sample_notebooks/Akshay Ghogare/AKSHAY_GHOGARE_1.ipynb new file mode 100755 index 00000000..a2326ccb --- /dev/null +++ b/sample_notebooks/Akshay Ghogare/AKSHAY_GHOGARE_1.ipynb @@ -0,0 +1,274 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:24b52c6a31667b62249d4037d9a99a947845157c2c3e5346e2fea8b2b04412a0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "SAMPLE EXAMPLE 1" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=12.5; #CaCO3 in water in mg/lit#\n", + "W2=8.4; #MgCO3 in water in mg/lit#\n", + "W3=22.2; #CaCl2 in water in mg/lit#\n", + "W4=9.5; #MgCl2 in water in mg/lit#\n", + "W5=33; #CO2 in water in mg/lit#\n", + "W6=6.68; #NaHCO3 in water in mg/lit#\n", + "M1=100.0/100.0; #multiplication factor of CaCO3#\n", + "M2=100.0/84; #multiplication factor of MgCO3#\n", + "M3=100.0/111; #multiplication factor of CaCl2#\n", + "M4=100.0/95; #multiplication factor of MgCl2#\n", + "M6=100.0/84; #multiplication factor of NaHCO3#\n", + "P1=W1*M1; #CaCO3 in terms of CaCO3#\n", + "P2=W2*M2; #MgCO3 in terms of CaCO3#\n", + "P3=W3*M3; #CaCl2 in terms of CaCO3#\n", + "P4=W4*M4; #MgCl2 in terms of CaCO3#\n", + "P6=W6*M6; #NaHCO3 in terms of CaCO3#\n", + "print\"We do not take CO2 since it does not contribute to hardness \" \n", + "C=P1+P2+P6;\n", + "print\" Carbonate hardness is\",round(C,4),\"mg/l or ppm\"\n", + "NC=P3+P4;\n", + "print\" Non Carbonate hardness is\",NC,\"mg/l or ppm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We do not take CO2 since it does not contribute to hardness \n", + " Carbonate hardness is 30.4524 mg/l or ppm\n", + " Non Carbonate hardness is 30.0 mg/l or ppm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=40.5; #Ca(HCO3)2 in water in mg/lit#\n", + "W2=33.3; #CaCl2 in water in mg/lit#\n", + "W3=41; #Ca(NO3)2 in water in mg/lit#\n", + "W4=101; #KNO3 in water in mg/lit#\n", + "W5=33.6; #MgCO3 in water in mg/lit#\n", + "M1=100.0/162; #multiplication factor of Ca(HCO3)2#\n", + "M2=100.0/111; #multiplication factor of CaCl2#\n", + "M3=100.0/164; #multiplication factor of Ca(NO3)2#\n", + "M5=100.0/84; #multiplication factor of MgCO3#\n", + "P1=W1*M1; #Ca(HCO3)2 in terms of CaCO3#\n", + "P2=W2*M2; #CaCl2 in terms of CaCO3#\n", + "P3=W3*M3; #Ca(NO3)2 in terms of CaCO3#\n", + "P5=W5*M5; #MgCO3 in terms of CaCO3#\n", + "print \"We do not take KNO3 since it does not contribute to hardness \"\n", + "C=P1+P5;\n", + "print \"Carbonate hardness is\",C,\" mg/l or ppm\"\n", + "NC=P2+P3;\n", + "print \"Non Carbonate hardness is\",NC,\" mg/l or ppm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We do not take KNO3 since it does not contribute to hardness \n", + "Carbonate hardness is 65.0 mg/l or ppm\n", + "Non Carbonate hardness is 55.0 mg/l or ppm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=29.1; #Mg(HCO3 2 in water in mg/lit#\n", + "W2=40.5; #Ca(HCO3 2 in water in mg/lit#\n", + "W3=11.1; #CaCl2 in water in mg/lit#\n", + "W4=15.82; #MgCl2 in water in mg/lit#\n", + "W5=28.5; #NaCl in water in mg/lit#\n", + "W6=22.0; #CO2 in water in mg/lit#\n", + "M1=100.0/146.007; #multiplication factor of Mg(HCO3 2#\n", + "M2=100.0/162; #multiplication factor of Ca(HCO3 2#\n", + "M3=100.0/111; #multiplication factor of CaCl2#\n", + "M4=100.0/95.005; #multiplication factor of MgCl2#\n", + "P1=W1*M1; #Mg(HCO3 2 in terms of CaCO3#\n", + "P2=W2*M2; #Ca(HCO3 2 in terms of CaCO3#\n", + "P3=W3*M3; #CaCl2 in terms of CaCO3#\n", + "P4=W4*M4; #MgCl2 in terms of CaCO3#\n", + "print\"We do not take NaCl and CO2 since they do not contribute to hardness \" \n", + "C=P1+P2;\n", + "print\" Carbonate hardness is\",round(C,4),\"mg/l or ppm\"\n", + "NC=P3+P4;\n", + "print\" Non Carbonate hardness is\",round(NC,4),\"mg/l or ppm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We do not take NaCl and CO2 since they do not contribute to hardness \n", + " Carbonate hardness is 44.9306 mg/l or ppm\n", + " Non Carbonate hardness is 26.6518 mg/l or ppm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=16.2; #Ca(HCO3 2 in water in mg/lit#\n", + "W2=14.6; #Mg(HCO3 2 in water in mg/lit#\n", + "W3=9.5; #MgCl2 in water in mg/lit#\n", + "W4=48; #MgSO4 in water in mg/lit#\n", + "W5=12; #KCl in water in mg/lit#\n", + "M1=100.0/162; #multiplication factor of Ca(HCO3 2#\n", + "M2=100.0/146; #multiplication factor of Mg(HCO3 2 #\n", + "M3=100.0/95; #multiplication factor of MgCl2#\n", + "M4=100.0/120; #multiplication factor of MgSO4#\n", + "P1=W1*M1; #Ca(HCO3 2 in terms of CaCO3#\n", + "P2=W2*M2; #Mg(HCO3 2 in terms of CaCO3#\n", + "P3=W3*M3; #MgCl2 in terms of CaCO3#\n", + "P4=W4*M4; #MgSO4 in terms of CaCO3#\n", + "print\"We do not take KCl since it does not contribute to hardness \" \n", + "C=P1+P2;\n", + "print\" Carbonate hardness is\",C,\"mg/l or ppm\";\n", + "NC=P3+P4;\n", + "print\" Non Carbonate hardness is\",NC,\"mg/l or ppm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We do not take KCl since it does not contribute to hardness \n", + " Carbonate hardness is 20.0 mg/l or ppm\n", + " Non Carbonate hardness is 50.0 mg/l or ppm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.18.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "W1=81; #Ca(HCO3 2 in water in mg/lit#\n", + "W2=84; #MgCO3 in water in mg/lit#\n", + "W3=22.2; #CaCl2 in water in mg/lit#\n", + "W4=60; #MgSO4 in water in mg/lit#\n", + "W5=30; #KCl in water in mg/lit#\n", + "M1=100.0/162; #multiplication factor of Ca(HCO3 2#\n", + "M2=100.0/84; #multiplication factor of MgCO3#\n", + "M3=100.0/111; #multiplication factor of CaCl2#\n", + "M4=100.0/120; #multiplication factor of MgSO4#\n", + "P1=W1*M1; #Ca(HCO3 2 in terms of CaCO3#\n", + "P2=W2*M2; #MgCO3 in terms of CaCO3#\n", + "P3=W3*M3; #CaCl2 in terms of CaCO3#\n", + "P4=W4*M4; #MgSO4 in terms of CaCO3#\n", + "print\"We do not take KCl since it does not contribute to hardness \" \n", + "T=P1+P2;\n", + "print\" Temporary hardness is \",T,\"mg/l or ppm\"\n", + "P=P3+P4;\n", + "print\" Permanant hardness is \",P,\"mg/l or ppm\"\n", + "To=T+P;\n", + "print\" Total hardness is \",To,\"mg/l or ppm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We do not take KCl since it does not contribute to hardness \n", + " Temporary hardness is 150.0 mg/l or ppm\n", + " Permanant hardness is 70.0 mg/l or ppm\n", + " Total hardness is 220.0 mg/l or ppm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |