summaryrefslogtreecommitdiff
path: root/Textbook_of_Engineering_Chemistry/dChapter_2.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Textbook_of_Engineering_Chemistry/dChapter_2.ipynb')
-rwxr-xr-xTextbook_of_Engineering_Chemistry/dChapter_2.ipynb1402
1 files changed, 1402 insertions, 0 deletions
diff --git a/Textbook_of_Engineering_Chemistry/dChapter_2.ipynb b/Textbook_of_Engineering_Chemistry/dChapter_2.ipynb
new file mode 100755
index 00000000..9db18147
--- /dev/null
+++ b/Textbook_of_Engineering_Chemistry/dChapter_2.ipynb
@@ -0,0 +1,1402 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:Acids and Bases"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:1,Page no:38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "OH=0.0025 #OH- concentration#\n",
+ "K=1*10**-14#water ionization constant#\n",
+ "\n",
+ "#Calculation\n",
+ "H=K/OH \n",
+ "H=H/10**-12 \n",
+ "\n",
+ "#Result\n",
+ "print\"The concentration of H+ ions is\",H*10**-12,\"M\" \n",
+ " \n",
+ "print\"\\nAs concentration of H+ is lesser than the concentration of OH-(0.0025) the cleaning solution will be basic in nature\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The concentration of H+ ions is 4e-12 M\n",
+ "\n",
+ "As concentration of H+ is lesser than the concentration of OH-(0.0025) the cleaning solution will be basic in nature\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2,Page no:40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "pH=7.3 #pH value of human blood\n",
+ "H=10**-pH \n",
+ "\n",
+ "#Calculation\n",
+ "H1=H\n",
+ "k=1*10**-14 #water ionization constant\n",
+ "OH=k/H \n",
+ "OH=OH\n",
+ "\n",
+ "#Result\n",
+ "print\"H+ concentration of human blood is %.e\"%H1,\"M\" \n",
+ "print\"\\nOH- concentration of human blood is %.3g\"%OH,\"M(in scientiifc form) or 0.2*10**-6 M\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "H+ concentration of human blood is 5e-08 M\n",
+ "\n",
+ "OH- concentration of human blood is 2e-07 M(in scientiifc form) or 0.2*10**-6 M\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:3,Page no:41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Variable declaration\n",
+ "N1=0.2 #normality of HCl#\n",
+ "V1=25 #volume of HCl in ml#\n",
+ "M2=0.25 #molarity of NaOH#\n",
+ "N2=M2*1 #normality of NaOH#\n",
+ "V2=50 #volume of NaOH in ml#\n",
+ "\n",
+ "#Calculation\n",
+ "V=V1+V2 #volume of resulting solution#\n",
+ "N=(N2*V2-N1*V1)/V #normality of resulting solution#\n",
+ "\n",
+ "K=1*10**-14 #ionization constant of water#\n",
+ "H=K/N \n",
+ "H1=H/10**-13 \n",
+ "\n",
+ "pH=-math.log10(H) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\npH of the mixure will be\",pH"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "pH of the mixure will be 13.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:4,Page no:44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "S=0.2 #salt concentration#\n",
+ "A=0.2 #acid concentration#\n",
+ "k=1.8*10**-5 #dissociation constant of acetic acid#\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "pH=-math.log10(k)+math.log10(S/A) \n",
+ "v=1*10**-3 #amount of HCl added in lit#\n",
+ "M=1 #molarity of HCl added#\n",
+ "n=v*M #no of moles of HCl added per litre#\n",
+ "A1=A+n \n",
+ "S1=S-n \n",
+ "pH2=-math.log10(k)+math.log10(S1/A1) \n",
+ "p=pH-pH2 \n",
+ "\n",
+ "#Result\n",
+ "print\"pH of the buffer solution before adding HCl is\",round(pH ,4)\n",
+ "\n",
+ "print\"\\npH of the buffer solution after adding HCl is\",round(pH2,3)\n",
+ "print\"\\nAns: Change in pH is\",round(p,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pH of the buffer solution before adding HCl is 4.7447\n",
+ "\n",
+ "pH of the buffer solution after adding HCl is 4.74\n",
+ "\n",
+ "Ans: Change in pH is 0.004\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.1,Page no:46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#(a)#\n",
+ "#Variable declaration\n",
+ "N1=1.0/1000.0 #normality of HCl#\n",
+ "a=100.0 #percentage of ionization#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "C1=N1*a/100.0 \n",
+ "pH1=-math.log10(C1) \n",
+ "N2=1.0/10000.0 #normality of NaOH solution#\n",
+ "C2=N2*a/10.0 \n",
+ "C2a=C2/10.0**-4 \n",
+ "k=10.0**-14 #dissociation constant of water#\n",
+ "H2=k/C2 \n",
+ "H2a=H2/10.0**-10 \n",
+ "pH2=-math.log10(H2) \n",
+ "N3=1.0/1000.0 #normality of NaOH solution#\n",
+ "C3=N3*a/1000.0 \n",
+ "C3a=C3/10.0**-3 \n",
+ "H3=k/C3 \n",
+ "H3a=H3/10.0**-11 \n",
+ "pH3=-math.log10(H3) \n",
+ "\n",
+ "#Result\n",
+ "print\"Ans(a)\\n(i)\\tThe pH of N/1000 HCl solution is\",pH1 \n",
+ "print\"\\n(ii)\\tThe pH of the N/10000 solution is\",pH2 \n",
+ "print\"\\n(iii)\\tThe pH of the N/1000 solution is\",pH3\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#(b)#\n",
+ "#Variable declaration\n",
+ "N=0.1 #normality of given weak base#\n",
+ "pH=9.0 #pH of the base#\n",
+ "H=10.0**(-pH) \n",
+ "Ha=H/10.0**-9\n",
+ "\n",
+ "#Calculation\n",
+ "OH=k/H \n",
+ "OHa=OH/10.0**-5 \n",
+ "a1=OH/N \n",
+ "a1b=a1\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nAns(b)\\nDegree of ionization of given weak base is\",a1b,\"=\",a1b*100,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ans(a)\n",
+ "(i)\tThe pH of N/1000 HCl solution is 3.0\n",
+ "\n",
+ "(ii)\tThe pH of the N/10000 solution is 11.0\n",
+ "\n",
+ "(iii)\tThe pH of the N/1000 solution is 10.0\n",
+ "\n",
+ "Ans(b)\n",
+ "Degree of ionization of given weak base is 0.0001 = 0.01 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.2,Page no:47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "N=0.002 #normality of acetic acid solution#\n",
+ "a=2.3 #percentage of ionization#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "H=N*a/100.0 #concentration of H+ ion#\n",
+ "pH=-math.log10(H) \n",
+ "\n",
+ "#Result\n",
+ "print\"\\nAns(a)\\n pH value of acid solution is\",round(pH,4)\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Part b(b)#\n",
+ "\n",
+ "#Variable declaration\n",
+ "N1=0.01 #normality of acetic acid solution#\n",
+ "a1=60.0 #percentage of ionization#\n",
+ "#ii#\n",
+ "N2=0.1 #normality of acetic acid solution#\n",
+ "a2=1.8 #percentage of ionization#\n",
+ "#iii#\n",
+ "N3=0.04 #normality of HNO3#\n",
+ "a3=100.0 #percentage of ionization#\n",
+ "#iv#\n",
+ "W=4.0 #weight of NaOH dissolved in water in grams#\n",
+ "EW=40.0 #equivalent weight weight of NaOH#\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#i#\n",
+ "H1=N1*a1/100.0 #concentration of H+ ion#\n",
+ "pH1=-math.log10(H1) \n",
+ "#ii#\n",
+ "H2=N2*a2/100.0 #concentration of H+ ion#\n",
+ "pH2=-math.log10(H2) \n",
+ "#iii#\n",
+ "H3=N3*a3/100.0 \n",
+ "pH3=-math.log10(H3) \n",
+ "N4=0.0001 #normality of Hcl#\n",
+ "a4=100.0 #percentage of ionization#\n",
+ "H4=N4*a4/100.0 \n",
+ "pH4=-math.log10(H4) \n",
+ "N5=1.0 #normality of Hcl#\n",
+ "a5=100.0 #percentage of ionization#\n",
+ "H5=N5*a5/100.0 \n",
+ "pH5=-math.log10(H5) \n",
+ "N6=0.1 #normality of HNO3#\n",
+ "a6=100.0 #percentage of ionization#\n",
+ "OH6=N6*a6/100.0 \n",
+ "Kw=10.0**-14 \n",
+ "H6=Kw/OH6 \n",
+ "pH6=-math.log10(H6)\n",
+ "N7=0.001 #normality of NaOH#\n",
+ "a7=100.0 #percentage of ionization#\n",
+ "OH7=N7*a7/100.0 \n",
+ "Kw=10.0**-14 \n",
+ "H7=Kw/OH7 \n",
+ "pH7=-math.log10(H7) \n",
+ "#iv#\n",
+ "N8=W/EW \n",
+ "a8=100.0 #percentage of ionization#\n",
+ "OH8=N8*a8/100.0 \n",
+ "Kw=10.0**-14 \n",
+ "H8=Kw/OH8 \n",
+ "pH8=-math.log10(H8) \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print'\\nAns(b)\\n(i) pH value of 0.01N acid solution is',round(pH1,4)\n",
+ "\n",
+ "print\"\\n(ii) pH value of decinormal acid solution is\",round(pH2 ,4)\n",
+ "\n",
+ "print\"\\n(iii) The pH of 0.04N HNO3 solution is\",round(pH3,3)\n",
+ "print\"\\n The pH of 0.0001N Hcl solution is\",pH4 \n",
+ "print\"\\n The pH of 1N Hcl solution is\",pH5 \n",
+ "print\"\\n The pH of 0.1N NaOH solution is \",pH6\n",
+ "print\"\\n The pH of 0.01N NaOH solution is\",pH7\n",
+ "\n",
+ "print\"\\n(iv) The pH of solution containing 4g NaoH solution is \",pH8 "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Ans(a)\n",
+ " pH value of acid solution is 4.3372\n",
+ "\n",
+ "Ans(b)\n",
+ "(i) pH value of 0.01N acid solution is 2.2218\n",
+ "\n",
+ "(ii) pH value of decinormal acid solution is 2.7447\n",
+ "\n",
+ "(iii) The pH of 0.04N HNO3 solution is 1.398\n",
+ "\n",
+ " The pH of 0.0001N Hcl solution is 4.0\n",
+ "\n",
+ " The pH of 1N Hcl solution is -0.0\n",
+ "\n",
+ " The pH of 0.1N NaOH solution is 13.0\n",
+ "\n",
+ " The pH of 0.01N NaOH solution is 11.0\n",
+ "\n",
+ "(iv) The pH of solution containing 4g NaoH solution is 13.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.3,Page no:48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "N1=0.1 #normality of acetic acid#\n",
+ "a1=1.3 #percentage of ionization#\n",
+ "M1=10**-8 #molarity of hcl solution#\n",
+ "a=100 #percentage of ionization#\n",
+ "N2=0.05 #normality of Hcl#\n",
+ "a2=100 #percentage of ionization#\n",
+ "\n",
+ "#Calculation\n",
+ "#(a)#\n",
+ "H1=N1*a1/100 \n",
+ "#(b)#\n",
+ "H=M1*a/100 \n",
+ "pH=-math.log10(H) \n",
+ "#(c)#\n",
+ "pH2=-math.log10(N2*a2/100) \n",
+ "M3=0.05 #molarity os H2SO4#\n",
+ "a3=100 #percentage of ionization#\n",
+ "pH3=-math.log10(M3*a3/100.0) \n",
+ "\n",
+ "#Result\n",
+ "print\"(a).The hydrogen ion concentration of solution is %.2e\"%H1,\"g.ion/lit\"\n",
+ "print'\\n(b).The pH of the Hcl solution is',pH\n",
+ "print\"Theoretically the pH should be 8,however,the value will be close to 7 because H+ ions of water also plays a role\"\n",
+ "print\"\\n(c).The pH of 0.05 Hcl solution is\",round(pH2,3)\n",
+ "print\"The pH of 0.05M H2SO4 solution is\",round(pH3,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a).The hydrogen ion concentration of solution is 1.30e-03 g.ion/lit\n",
+ "\n",
+ "(b).The pH of the Hcl solution is 8.0\n",
+ "Theoretically the pH should be 8,however,the value will be close to 7 because H+ ions of water also plays a role\n",
+ "\n",
+ "(c).The pH of 0.05 Hcl solution is 1.301\n",
+ "The pH of 0.05M H2SO4 solution is 1.301\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.4,Page no:49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "H1=0.005 #H+ ion concentration of solution in g.ion/lit#\n",
+ "H2=3*10**-4 #H+ concentration of the solution#\n",
+ "k=10**-14 #dissociation constant of water#\n",
+ "OH3=0.1#hydroxyl concentration of a solution#\n",
+ "k4=1.8*10**-5#dissociation constant of acetic acid at 180C#\n",
+ "N4=0.1 #normality of acetic acid#\n",
+ "N5=0.01 #normality of acetic acid#\n",
+ "N6=0.001 #normality of acetic acid#\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Part-a#\n",
+ "pH1=-math.log10(H1) \n",
+ "\n",
+ "#Part-b#\n",
+ "pH2=-math.log10(H2) \n",
+ "pOH2=14-pH2 \n",
+ "OH2=k/H2\n",
+ "\n",
+ "#Part-c#\n",
+ "H3=k/OH3 \n",
+ "pH3=-math.log10(H3) \n",
+ "V4=1/N4 \n",
+ "\n",
+ "#Part-d#\n",
+ "a4=math.sqrt(k4*V4) #formula for degree of dissociation#\n",
+ "H4=N4*a4 #H+ ion concentration#\n",
+ "pH4=-math.log10(H4) \n",
+ "V5=1/N5 \n",
+ "a5=sqrt(k4*V5) #formula for degree of dissociation#\n",
+ "H5=N5*a5 #H+ ion concentration#\n",
+ "pH5=-math.log10(H5) \n",
+ "V6=1/N6 \n",
+ "a6=sqrt(k4*V6) #formula for degree of dissociation#\n",
+ "H6=N6*a6 #H+ ion concentration#\n",
+ "pH6=-math.log10(H6) \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"\\n\\n(a) The pH value of solution whose H+ ion concentration is 0.005g.ion/lit is\",round(pH1 ,3)\n",
+ "print\"\\n(b) The pH of a solution in which H+ is 3*10**-4 is\",round(pH2 ,2)\n",
+ "print\"\\n pOH of the solution is\",round(pOH2,2)\n",
+ "print\"\\n OH- concentration for a solution is%.1e\"%OH2,\"M\"\n",
+ "print\"\\n(c) pH of the solution whose hydroxyl concentration is N/10g.ion/lit is\",pH3\n",
+ "print\"\\n(d) pH of 0.1N acetic acid solution is\",round(pH4,3)\n",
+ "print\"\\n pH of 0.01N acetic acid solution is\",round(pH5,4)\n",
+ "print\"\\n pH of 0.001N acetic acid solution is\",round(pH6,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "\n",
+ "(a) The pH value of solution whose H+ ion concentration is 0.005g.ion/lit is 2.301\n",
+ "\n",
+ "(b) The pH of a solution in which H+ is 3*10**-4 is 3.52\n",
+ "\n",
+ " pOH of the solution is 10.48\n",
+ "\n",
+ " OH- concentration for a solution is3.3e-11 M\n",
+ "\n",
+ "(c) pH of the solution whose hydroxyl concentration is N/10g.ion/lit is 13.0\n",
+ "\n",
+ "(d) pH of 0.1N acetic acid solution is 2.872\n",
+ "\n",
+ " pH of 0.01N acetic acid solution is 3.3724\n",
+ "\n",
+ " pH of 0.001N acetic acid solution is 3.8724\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.5,Page no:51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "K1=10.0**-8 #dissociation constant of weak mono basic acid#\n",
+ "N1=0.01 #normality of the acid#\n",
+ "a2=4.0/100.0 #percentage of dissociation of acid at 20C#\n",
+ "N2=0.1 #normality of acid#\n",
+ "N3=0.1 #normality of HCl#\n",
+ "N4=1.0/50.0 #normality of HCl#\n",
+ "N5=0.01 #normality of H2SO4#\n",
+ "\n",
+ "#Calculation\n",
+ "#Part-a#\n",
+ "V1=1.0/N1 \n",
+ "a1=math.sqrt(K1*V1) #degree of dissociation for weak acids#\n",
+ "H1=N1*a1 #H+ concentration of the solution#\n",
+ "pH1=-math.log10(H1) \n",
+ "#Part-b#\n",
+ "V2=1.0/N2 \n",
+ "K2=(a2**2)/V2 \n",
+ "#Part-c#\n",
+ "pH3=-math.log10(N3) \n",
+ "pH4=-math.log10(N4) \n",
+ "pH5=-math.log10(N5) \n",
+ "\n",
+ "#Result\n",
+ "print\"(a) pH value of 0.01N solution of a weak mono basic acid is\",pH1 \n",
+ "print\"\\n(b) The dissociation constant of the acid is %.1e\"%K2\n",
+ "print\"\\n(c) The pH of the 0.1N HCl solution is\",pH3\n",
+ "print\"\\n The pH of the 1/50N HCl solution is\",round(pH4,1)\n",
+ "print\"\\n The pH of the 0.01N H2SO4 solution is \",pH5"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) pH value of 0.01N solution of a weak mono basic acid is 5.0\n",
+ "\n",
+ "(b) The dissociation constant of the acid is 1.6e-04\n",
+ "\n",
+ "(c) The pH of the 0.1N HCl solution is 1.0\n",
+ "\n",
+ " The pH of the 1/50N HCl solution is 1.7\n",
+ "\n",
+ " The pH of the 0.01N H2SO4 solution is 2.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.6,Page no:52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V1=50.0 #volume of Hcl in ml#\n",
+ "V2=30.0 #volume of NaOH in ml#\n",
+ "N1=1.0 #normality of Hcl#\n",
+ "N2=1.0 #nomality of NaOH#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "V=V1+V2 #total volume of mixure of solutions#\n",
+ "a=100.0 #percentage of ionization#\n",
+ "N=(N1*V1-N2*V2)/V \n",
+ "H=N*a/100 \n",
+ "pH=-math.log10(H) \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print'\\nThe pH of resultant solution is',round(pH,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The pH of resultant solution is 0.602\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.7,Page no:52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "N1=1.0/10.0 #normality of NaOH#\n",
+ "N2=1.0/20.0 #normality of HCl#\n",
+ "V1=1.0 #volume of NaOH in lit#\n",
+ "V2=1.0 #volume of HCl in lit#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "V=V1+V2 #volume of resultant solution#\n",
+ "N=(N1*V1-N2*V2)/V \n",
+ "k=1.0*10.0**-14 #ionization constant of water#\n",
+ "H1=k/N \n",
+ "H=H1/10.0**-13 \n",
+ "pH=-math.log10(H1)\n",
+ "\n",
+ "#Result\n",
+ "print\"\\npH of the solution is\",round(pH,1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "pH of the solution is 12.4\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.8,Page no:53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "W=2.0 #weight of NaOH dissolved in water in grams#\n",
+ "M=40.0 #molecular weight of NaOH#\n",
+ "N=W/M #normality#\n",
+ "a=100.0 #percentage of ionization#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "OH=N*a/100.0 #the OH- ion concentration of solution#\n",
+ "Kw=10.0**-14 \n",
+ "H=Kw/OH \n",
+ "pH=-math.log10(H) \n",
+ "\n",
+ "#Result\n",
+ "print'\\n The pH of the NaOH solution is',round(pH,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " The pH of the NaOH solution is 12.7\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.9,Page no:53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "M=0.001 #molarity of benzoic acid#\n",
+ "N=M #normality of benzoic acid#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "V=1/N \n",
+ "K=7.3*10**-5 #dissociation constant of benzoic acid#\n",
+ "a=math.sqrt(K*V) #since benzoic acid is very weak#\n",
+ "\n",
+ "#Result\n",
+ "H=N*a \n",
+ "print\"\\n The H+ concentration of the solution is%.3e\"%H,\"g.ion/litre\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " The H+ concentration of the solution is2.702e-04 g.ion/litre\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.10,Page no:53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "W=0.092 #weight of Formic acid per litre in grams#\n",
+ "M=46 #molecular weight of Formic acid#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "N=W/M \n",
+ "V=1/N \n",
+ "K=2.4*10**-4 #Dissociation constant of Formic acid at 25C#\n",
+ "a=math.sqrt(K*V) #For weak acids#\n",
+ "\n",
+ "#Result\n",
+ "H=a*N \n",
+ "print'\\n The H+ concentration of the solution is %.3e'%H"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " The H+ concentration of the solution is 6.928e-04\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.11,Page no:54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=2.5*10**-5 #dissociation constant of NH4OH#\n",
+ "N=1.0/100.0 #normality of NH4OH#\n",
+ "V=100\n",
+ "#Calculation\n",
+ "C=N #since volume of solution is one litre#\n",
+ "NH=C \n",
+ "NHOH=C \n",
+ "OH1=k*NHOH/NH \n",
+ "a=math.sqrt(k*V)\n",
+ "\n",
+ "#Result\n",
+ "print\"Cong of OH- ions in solution is\",a*N,\"g ion per litre\"\n",
+ "print\"\\nWhen 1/100 part of a g mol NH4Cl are dissolverd in a litre ,then ,\\nHydroxyl ion concentration in the solution is\",OH1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cong of OH- ions in solution is 0.0005 g ion per litre\n",
+ "\n",
+ "When 1/100 part of a g mol NH4Cl are dissolverd in a litre ,then ,\n",
+ "Hydroxyl ion concentration in the solution is 2.5e-05\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.12,Page no:56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "K=1.7*10**-5 #Dissociation constant of NH4OH#\n",
+ "N=0.01 #Normality of NH4OH solution#\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "V=1.0/N \n",
+ "a=math.sqrt(K*V) #since a is very small#\n",
+ "OH=a*N \n",
+ "\n",
+ "NH4=0.05 #concentration of NH4+ in g.ion/lit#\n",
+ "NH4OH=0.01 #concentration of NH4OH in g.mol/lit#\n",
+ "OH2=K*NH4OH/NH4 \n",
+ "#Result\n",
+ "print\"\\nConcentration of OH- ions before addition of NH4Cl is %.2e\"%OH,\"g.ion/litre\"\n",
+ "print\"\\nThe concentration of hydroxyl ions after adding NH4Cl is\",OH2,\"g.ion/litre\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Concentration of OH- ions before addition of NH4Cl is 4.12e-04 g.ion/litre\n",
+ "\n",
+ "The concentration of hydroxyl ions after adding NH4Cl is 3.4e-06 g.ion/litre\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.13,Page no:56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "k=1.8*10**-5 #dissociation constant of acetic acid at 18C#\n",
+ "N=0.25 #normality of acetic acid solution#\n",
+ "N2=0.25#normality os sodium acetate added#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "#Part-a#\n",
+ "V=1/N \n",
+ "a=math.sqrt(k*V) #formula of degree of dissociation for weak acids#\n",
+ "H=N*a \n",
+ "#Part-b#\n",
+ "CH3COO=N2 \n",
+ "CH3COOH=N2 \n",
+ "H2=k*CH3COOH/CH3COO \n",
+ "H3=H2/10**-5 \n",
+ "a2=H2/N2 \n",
+ "a3=a2/10**-5 \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) 0.25 N acetic acid solution---\"\n",
+ "print\"\\tDegree of dissociation of acetic acid is %.3e\"%a\n",
+ "print\"\\tH+ concentration of the solution is %.3e\"%H,\"g.ion/litre\"\n",
+ "\n",
+ "print\"\\n(b) 0.25 N acetic acid solution containing 0.25N sodium acetate----\"\n",
+ "print\"\\tH+ ion concentration after adding sodium acetate is\",H3*10**-5\n",
+ "print\"\\tDegree of dissociation after adding sodium acetate is\",a3*10**-5"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) 0.25 N acetic acid solution---\n",
+ "\tDegree of dissociation of acetic acid is 8.485e-03\n",
+ "\tH+ concentration of the solution is 2.121e-03 g.ion/litre\n",
+ "\n",
+ "(b) 0.25 N acetic acid solution containing 0.25N sodium acetate----\n",
+ "\tH+ ion concentration after adding sodium acetate is 1.8e-05\n",
+ "\tDegree of dissociation after adding sodium acetate is 7.2e-05\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.14,Page no:57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "C1=0.06 #concentration od acetic acid in g.mol/lit#\n",
+ "C2=0.04 #concentration of sodium acetate in g.mol/li#\n",
+ "K=1.8*10**-5 #dissociation constant of acetic acid#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "H=K*C1/C2 \n",
+ "pH=-math.log10(H) \n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe pH of solution is\",round(pH,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The pH of solution is 4.5686\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.15,Page no:58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "M1=0.2 #molarity of acetic acid#\n",
+ "M2=0.2 #molarity of sodium acetate#\n",
+ "K=1.8*10**-5 \n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "pH=-math.log10(K)+math.log10(M2/M1) #by using Henderson's equation#\n",
+ "\n",
+ "#Result\n",
+ "print\"The pH value of buffer solution is\",round(pH,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pH value of buffer solution is 4.7447\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.16,Page no:58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "N=1.0/100.0 #normality of acetic acid#\n",
+ "V=1.0/N \n",
+ "k=1.8*10**-5 #dissociation constant of acetic acid#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Part-a#\n",
+ "a=math.sqrt(k*V) #formula of degree of dissociation for weak acids#\n",
+ "H=a*N \n",
+ "\n",
+ "#Part-b#\n",
+ "n=0.01 #sodium acetate added in moles to one litre of acetic acid solution#\n",
+ "CH3COO=n \n",
+ "CH3COOH=n \n",
+ "H1=k*CH3COOH/CH3COO \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"(a) H+ concentration of N/100 acetic acid solution is %.2e\"%H,\"g ion/litre\"\n",
+ "print\"\\n(b) H+ ion concentration in the solution after adding the sodium acetate is\",H1,\"g.ions/litre\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) H+ concentration of N/100 acetic acid solution is 4.24e-04 g ion/litre\n",
+ "\n",
+ "(b) H+ ion concentration in the solution after adding the sodium acetate is 1.8e-05 g.ions/litre\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.17,Page no:59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V=10 #volume of water in litres#\n",
+ "N1=0.10 #moles of HCN added in solution#\n",
+ "N2=0.10 #moles of NaCN added in solution#\n",
+ "K=7.2*10**-10 #dissociation constant of HCN#\n",
+ "CN=0.1 #CN- concentration#\n",
+ "HCN=0.1 #HCN concentration#\n",
+ "\n",
+ "#Calculation\n",
+ "H1=K*HCN/CN \n",
+ "H=H1/10**-10 \n",
+ "k=1*10**-14 #ionization constant of water#\n",
+ "\n",
+ "#Result\n",
+ "print\"H+ concentration in the solution is\",H*10**-10\n",
+ "OH=k/H1 \n",
+ "print\"\\nOH- concentration in the solution is %.1e\"%OH"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "H+ concentration in the solution is 7.2e-10\n",
+ "\n",
+ "OH- concentration in the solution is 1.4e-05\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.18,Page no:59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "K=1.7*10**-5 #dissociation constant of acid#\n",
+ "pH=3.77#pH value of buffer solution#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "M=pH+math.log10(K) \n",
+ "N=10**M #ratio of salt to acid#\n",
+ "L=1/N\n",
+ "\n",
+ "#Result\n",
+ "print\"The ratio of salt to acid in buffer is\",round(L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ratio of salt to acid in buffer is 10.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.19,Page no:59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "k=1.8*10**-5 #dissociation constant of acetic acid#\n",
+ "M=0.01 #molarity of acetic acid#\n",
+ "N=M*1 #normality of acetic acid#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "V=1/N \n",
+ "a=math.sqrt(k*V)#degree of dissociation for weak acids#\n",
+ "H1=a/V \n",
+ "H=H1/10**-4 \n",
+ "pH=-math.log10(H1) \n",
+ "\n",
+ "#Result\n",
+ "print\"Degree of dissociation of solution is %.2e\"%a \n",
+ "print\"pH of the solution is\",round(pH ,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Degree of dissociation of solution is 4.24e-02\n",
+ "pH of the solution is 3.3724\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.20,Page no:60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "N1=0.2#concentration of acetic acid in g.molecule/lit#\n",
+ "N2=0.25#concentration of sodium acetate in g.molecule/lit#\n",
+ "K=1.8*10**-5#ionization constant of acetic acid at room temparature#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "pH1=-math.log10(K)+math.log10(N2/N1) \n",
+ "N=1.0#normality of HCl added#\n",
+ "V=0.5*10**-3#amount of HCl added in lit#\n",
+ "M=N*V\n",
+ "C1=N1+M#concentration of CH3COOH in moles/lit#\n",
+ "C2=N2-M#concentration of CH3COONa in moles/lit#\n",
+ "pH2=-math.log10(K)+math.log10(C2/C1)\n",
+ "pH=pH1-pH2 \n",
+ "\n",
+ "#Result\n",
+ "print\"pH value of the solution before adding HCl is\",round(pH1,4)\n",
+ "print\"\\nThe pH of the solution after adding HCl is\",round(pH2,4)\n",
+ "print\"\\nThe change of pH is\",round(pH,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pH value of the solution before adding HCl is 4.8416\n",
+ "\n",
+ "The pH of the solution after adding HCl is 4.8397\n",
+ "\n",
+ "The change of pH is 0.002\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.21,Page no:61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "K=18*10**-6 #dissociation constant of NH4OH#\n",
+ "N1=0.1 #normality of NH4OH solution#\n",
+ "V=1.0/N1 \n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "a=math.sqrt(K*V)#since a is very small#\n",
+ "OH=a/V \n",
+ "W=2.0#weight of added NH4Cl in grams#\n",
+ "M=53.0#molecular weight of NH4Cl#\n",
+ "C=W/M \n",
+ "C1=0.1 #concentration of NH4OH in g.mol/lit#\n",
+ "OH2=K*C1/C\n",
+ "CH3COO=0.02 #g ion per litre\n",
+ "CH3COOH=0.2 #g mol per litre\n",
+ "H_plus=K*CH3COOH/CH3COO\n",
+ "pH=math.log10(H_plus)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"\\nThe concentration of hydroxyl ion before adding of NH4Cl is %.3e\"%OH,\"g ion per litre\"\n",
+ "print\"\\nThe concentration of hydroxyl ion after adding 2g of NH4Cl is %.1e\"%OH2,\"g ion per litre\"\n",
+ "print\"NOTE:Calculation mistake in book.(wrongly written as 48.6*10**-5,it should be 10**-6\"\n",
+ "print \"\\npH is\",round(-pH,4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The concentration of hydroxyl ion before adding of NH4Cl is 1.342e-03 g ion per litre\n",
+ "\n",
+ "The concentration of hydroxyl ion after adding 2g of NH4Cl is 4.8e-05 g ion per litre\n",
+ "NOTE:Calculation mistake in book.(wrongly written as 48.6*10**-5,it should be 10**-6\n",
+ "\n",
+ "pH is 3.7447\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example no:2.22,Page no:62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ly=11.92 #equivalent conductvity of 0.02acetic acid solution in mho at 20C#\n",
+ "lih=360 #the equivalent ionic conductance of an infinite dillution of hydrogen ion in mho#\n",
+ "lic=40 #of acetate ion#\n",
+ "li=lih+lic #of acetic acid#\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "a=ly/li #degree of dissociation#\n",
+ "N=0.02 #normality of acetic acid#\n",
+ "V=1/N \n",
+ "K=(a**2)/V \n",
+ "W=82 #mol.wt of CH3COONa#\n",
+ "M=8.2#amount of sodium acetate added in g per litre solution#\n",
+ "CH3COO=M/W \n",
+ "H=K*N/CH3COO \n",
+ "pH=-math.log10(H) \n",
+ "\n",
+ "#Result\n",
+ "print\"Dissociation constant of acetic acid is %.2e\"%K\n",
+ "print\"\\npH of the solution is\",round(pH,2)\n",
+ "print\"\\nNOTE:\\n(i)Calculation istake in calculation of K in book,exponent wrongly written as -6\"\n",
+ "print\"(ii)pH is wrongly calculated in book as 3.45\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dissociation constant of acetic acid is 1.78e-05\n",
+ "\n",
+ "pH of the solution is 5.45\n",
+ "\n",
+ "NOTE:\n",
+ "(i)Calculation istake in calculation of K in book,exponent wrongly written as -6\n",
+ "(ii)pH is wrongly calculated in book as 3.45\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file