{ "metadata": { "name": "", "signature": "sha256:b22f521510881a8fff0ac38eb4b560555d5bde9f0fb22681533a13e45849f4b7" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "1: Crystallography and Crystal imperfection" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 1.1, Page number 40" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n=4; #number of atoms per unit cell(FCC)\n", "M=63.54; #atomic weight of Cu(gm)\n", "N=6.023*10**23; #avagadro number(per g mole)\n", "d111=2.08; #interplanar spacing(angstrom)\n", "h=1;\n", "k=1;\n", "l=1;\n", "\n", "#Calculation\n", "d111=d111*10**-8; #interplanar spacing(m) \n", "a=d111*math.sqrt((h**2)+(k**2)+(l**2)); \n", "D=(n*M)/(N*(a**3)); #density of Cu(g/cc)\n", "\n", "#Result\n", "print \"density of Cu metal is\",round(D,3),\"g/cc\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "density of Cu metal is 9.024 g/cc\n" ] } ], "prompt_number": 1 } ], "metadata": {} } ] }