summaryrefslogtreecommitdiff
path: root/Textbook_of_Engineering_Chemistry/dChapter_10.ipynb
blob: 86454a4ec2a2737426c78abb8cad9ceb6923b2c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10:Polymer Chemistry"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:1,Page no:272"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#Variable declaration\n",
      "N1=5.0 #no of molecules#\n",
      "N2=10.0 \n",
      "N3=20.0 \n",
      "N4=20.0 \n",
      "N5=10.0 \n",
      "M1=5000.0 #molecular mass of each molecule#\n",
      "M2=6000.0 \n",
      "M3=10000.0 \n",
      "M4=15000.0 \n",
      "M5=25000.0 \n",
      "\n",
      "#Calculation\n",
      "M=(M1*N1+M2*N2+M3*N3+M4*N4+M5*N5)/(N1+N2+N3+N4+N5) #formula for number average molecular mass#\n",
      "Mw=(N1*M1**2+N2*M2**2+N3*M3**2+N4*M4**2+N5*M5**2)/(M1*N1+M2*N2+M3*N3+M4*N4+M5*N5) #formula of weight-average molecular mass#\n",
      "\n",
      "#Result\n",
      "print\"The number average molecular mass is %.2e\"%M\n",
      "print\"\\nThe weight average molecular mass is %.2e\"%Mw"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number average molecular mass is 1.28e+04\n",
        "\n",
        "The weight average molecular mass is 1.59e+04\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}