{ "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 }