{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter20 Macromolecules"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.1, Page no.76"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "average molecular weight of this polystrene = 287.48 Kg moleˆ−1\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#initialisation of variables\n",
    "R=0.082 # l−atm degˆ−1 moleˆ−1 \n",
    "T=25 #C \n",
    "V=85*10**-6 # l−atm gˆ−1 \n",
    "#CALCULATIONS \n",
    "M=R*(273+T)/V \n",
    "#RESULTS\n",
    "M=M/10**3\n",
    "M=round(M,2)\n",
    "print 'average molecular weight of this polystrene =',M,'Kg moleˆ−1'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.2, Page no.76"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "maximum molecular weight = 69.41 Kg moleˆ−1\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import pi\n",
    "#initialisation of variables\n",
    "T=20 #C \n",
    "v=0.01005 # poise \n",
    "N=6*10**23 # molecules\n",
    "D=7.8*10** -7 \n",
    "#CALCULATIONS \n",
    "M=4*pi*N/(3*0.75*(D*N*6*pi*v/(8.31*10**7*(273+T))) **3) \n",
    "#RESULTS\n",
    "M=M/10**3\n",
    "M=round(M,2)\n",
    "print  'maximum molecular weight =',M,'Kg moleˆ−1'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.3, Page no.77"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "time = 1.04 * 10**-12 sec\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#initialisation of variables\n",
    "w=2.82*10**7 \n",
    "t2=70 #min \n",
    "t1=60 #min \n",
    "r2=6.731 #cm \n",
    "r1=5.949 #cm \n",
    "#CALCULATIONS \n",
    "s=2.303*math.log10(r2/r1)/(w*t2*t1)\n",
    "#RESULTS\n",
    "s=s*10**12\n",
    "s=round(s,2)\n",
    "print  'time =',s,'* 10**-12 sec'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.4, Page no.77"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "molecular weight serum albium = 63.92 Kg mole ˆ−1\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#initialisation of variables\n",
    "R=8.31*10**7 # ergs degˆ−1 moleˆ−1 \n",
    "T=20 #C \n",
    "s=4.3*10** -13 # sec \n",
    "D=6.15*10** -7 #cmˆ2 secˆ−1 \n",
    "d=0.9982 #g/ cc \n",
    "v=0.735 #cmˆ3 gˆ−1 \n",
    "#CALCULATIONS\n",
    "M=R*(273+T)*s/(D*(1-d*v))  \n",
    "#RESULTS\n",
    "M=M/10**3\n",
    "M=round(M,2)\n",
    "print 'molecular weight serum albium =',M,'Kg mole ˆ−1'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.5, Page no.78"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Molecular weight = 210.98 g moleˆ−1\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#initialisation of variables\n",
    "K=3.7*10** -4 \n",
    "a=0.62 \n",
    "iv=0.74 \n",
    "#CALCULATIONS \n",
    "M=(iv/K)**(1/a) \n",
    "#RESULTS\n",
    "M=M/10**3\n",
    "M=round(M,2)\n",
    "print 'Molecular weight =',M,'g moleˆ−1'"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [Root]",
   "language": "python",
   "name": "Python [Root]"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
