summaryrefslogtreecommitdiff
path: root/Physical_Chemistry_by_D._Farrington/Chapter22.ipynb
blob: 7c7f74f564ece83cd6dca3511a82d861cfc20f81 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter22 Crystals"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 22.1, Page no.81"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "distance between planes = 50.0 M A\n",
      "distance between planes = 70.71 M A\n",
      "distance between planes = 28.87 M A\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#initialisation of variables\n",
    "from math import sqrt\n",
    "d=0.856 #g/ cc\n",
    "N=6*10**23 # molecules\n",
    "M=39.1 #g moleˆ−1\n",
    "n=2\n",
    "n1=4\n",
    "n2=12\n",
    "#CALCULATIONS \n",
    "a=(n*M/(N*d))**(1/3) \n",
    "d=a*10**8/ sqrt(n1)\n",
    "d1=a*10**8/ sqrt(n) \n",
    "d2=a*10**8/ sqrt(n2) \n",
    "#RESULTS\n",
    "d=d/10**6\n",
    "d1=d1/10**6\n",
    "d2=d2/10**6\n",
    "d1=round(d1,2)\n",
    "d2=round(d2,2)\n",
    "print 'distance between planes =',d,'M A'\n",
    "print 'distance between planes =',d1,'M A'\n",
    "print 'distance between planes =',d2,'M A'"
   ]
  }
 ],
 "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
}