{
 "metadata": {
  "name": "",
  "signature": "sha256:3618981e1452ff2c0b6361fb015dd098d642a0d6a8ee8ec18ba8ad25ae07d260"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 Gases"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1 , Page no:21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "P= 730 #mm\n",
      "V= 20 #litres\n",
      "T= -20 #C\n",
      "P1= 760 #mm\n",
      "T1= 0 #C\n",
      "\n",
      "#CALCULATIONS\n",
      "V1= P*V*(273+T1)/((273+T)*760)\n",
      "\n",
      "#RESULTS\n",
      "print\" volume at STP =\",round(V1,1),\"litres\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " volume at STP = 20.7 litres\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2 , Page no:21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "N= 6*10**23 #molcules\n",
      "R= 0.0821 #lit atm mole^-1\n",
      "V= 20 #lit\n",
      "P= 730 #mm of Hg\n",
      "T= -20 #C\n",
      "\n",
      "#CALCULATIONS\n",
      "M= N*P*V/(760*R*(273+T))\n",
      "\n",
      "#RESULTS\n",
      "print\"Molecules =\",'%.2E'%M,\" molecules\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Molecules = 5.55E+23  molecules\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3 , Page no:21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "P= 100 #cm\n",
      "m= 2*10**20 #molecules\n",
      "N= 6*10**23\n",
      "R= 0.0821 #lit atm mole^-1\n",
      "T= 27 #C\n",
      "\n",
      "#CALCULATIONS\n",
      "V= m*R*(T+273)*760*100/(N*P)\n",
      "\n",
      "#RESULTS\n",
      "print\"Volume =\",round(V,2),\"cm^3\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Volume = 6.24 cm^3\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4 , Page no:21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "P= 752 #mm\n",
      "V= 0.2 #lit\n",
      "T= 21 #C\n",
      "R= 0.0821 #lit atm mole^-1\n",
      "m= 0.980 #gms\n",
      "\n",
      "#CALCULATIONS\n",
      "M= m*R*(T+273)*760/(V*P)\n",
      "\n",
      "#RESULTS\n",
      "print\"molecular weight of chloroform =\",round(M,1),\"gmsper mole\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "molecular weight of chloroform = 119.5 gmsper mole\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5 , Page no:23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "R= 8.31*10**7 #ergs mole^-1\n",
      "T= 27 #C\n",
      "M= 28 #gram per mole\n",
      "\n",
      "#CALCULATIONS\n",
      "c= math.sqrt(3*R*(273+T)/M)\n",
      "\n",
      "#RESULTS\n",
      "print\"root-mean-square velocity =\",'%.2E'%c,\"cm per sec\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "root-mean-square velocity = 5.17E+04 cm per sec\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.6 , Page no:24"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "P= 23.8 #mm\n",
      "V= 0.5 #lit\n",
      "R= 0.0821 #lit atm mole^-1\n",
      "T= 25 #C\n",
      "\n",
      "#CALCULATIONS\n",
      "P1= 760-P\n",
      "n= P1*V/(760*R*(273+T))\n",
      "V1= V*1000*P1*273/(760*(T+273))\n",
      "\n",
      "#RESULTS\n",
      "print\"Volume of oxygen =\",round(V1),\"ml\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Volume of oxygen = 444.0 ml\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7 , Page no:27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "t= 20 #min\n",
      "t1= 19.4 #min\n",
      "M= 32 #gms\n",
      "\n",
      "#CALCULATIONS\n",
      "x= M*t1**2/t**2\n",
      "\n",
      "#RESULTS\n",
      "print\"molecular weight of ethane =\",round(x,1),\"gms\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "molecular weight of ethane = 30.1 gms\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.8 , Page no:28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "R= 8.31*10**7 #ergs mole^-1\n",
      "T= 27 #C\n",
      "M= 28 #gram per mole\n",
      "\n",
      "#CALCULATIONS\n",
      "c= math.sqrt(3*R*(273+T)/M)\n",
      "\n",
      "#RESULTS\n",
      "print\"root-mean-square velocity =\",'%.2E'%c,\"cm per sec\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "root-mean-square velocity = 5.17E+04 cm per sec\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.9 , Page no:28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "V= 5.16*10**14 #cm per sec\n",
      "M2= 28 #gms\n",
      "M1= 2.02 #gms\n",
      "\n",
      "#CALCULATIONS\n",
      "c1= V*math.sqrt(M2/M1)\n",
      "\n",
      "#RESULTS\n",
      "print\"Velocity of hydrogen molecule =\",'%.2E'%c1,\"cm per sec\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Velocity of hydrogen molecule = 1.92E+15 cm per sec\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.10 , Page no:30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "V= 0.5 #lit\n",
      "T= 50 #C\n",
      "n= 1 #mole\n",
      "R= 0.0821 #lit atm mole^-1\n",
      "a= 4.28*10**-2 #litres mole^-1\n",
      "b= 3.6 #arm mole^-2 lit^2\n",
      "\n",
      "#CALCULATIONS\n",
      "P= n*R*(273+T)/V\n",
      "P1= (n*R*(T+273)/(V-n*a))-(b/V**2)\n",
      "\n",
      "#RESULTS\n",
      "print\"Pressure =\",round(P),\"atm\";\n",
      "print\"Pressure using vanderwals equation=\",round(P1,1),\"atm\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pressure = 53.0 atm\n",
        "Pressure using vanderwals equation= 43.6 atm\n"
       ]
      }
     ],
     "prompt_number": 10
    }
   ],
   "metadata": {}
  }
 ]
}