diff options
author | Thomas Stephen Lee | 2015-09-04 22:04:10 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-09-04 22:04:10 +0530 |
commit | 64419e47f762802600b3a2b6d8c433a16ccd3d55 (patch) | |
tree | 14ad7c37c9547cd516f141494f3fa375621edbaa /Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb | |
parent | 10f6fb8cd1d840a3042651dfaa6fd5af4924b94a (diff) | |
download | Python-Textbook-Companions-64419e47f762802600b3a2b6d8c433a16ccd3d55.tar.gz Python-Textbook-Companions-64419e47f762802600b3a2b6d8c433a16ccd3d55.tar.bz2 Python-Textbook-Companions-64419e47f762802600b3a2b6d8c433a16ccd3d55.zip |
add/remove/update books
Diffstat (limited to 'Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb')
-rwxr-xr-x | Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb | 800 |
1 files changed, 800 insertions, 0 deletions
diff --git a/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb new file mode 100755 index 00000000..4d1dc38d --- /dev/null +++ b/Advance_Semiconductor_Devices_by_S._Sharma/ChapterNo1.ipynb @@ -0,0 +1,800 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1> Chapter No 1 : Semiconductor Materials and\n",
+ "Their Properties<h1>"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page No 37 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Finding Density of silicon crystal\n",
+ "\n",
+ "#initialisation of variables\n",
+ "a=5.3 #in \u00c5\n",
+ "a=a*10**-10 #in m\n",
+ "N_A=6.023*10**23 \n",
+ "At_Si=28 #atomic weight of Si\n",
+ "n = 4\n",
+ "m=At_Si/N_A #in gm\n",
+ "m= m*10**-3 #in kg\n",
+ "V=a**3 #in m^3\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Rho=((m*n)/V)/1000 #in kg/m^3\n",
+ "\n",
+ "# Note: There is calculation error to find the value of density. So the answer in the book is wrong.#RESULTS\n",
+ "#RESULTS\n",
+ "print('Density of silicon crystal in kg/m^3 is = %.2f kg/m^3' %Rho)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density of silicon crystal in kg/m^3 is = 1.25 kg/m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4, Page No 37 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# Finding Density of the crystal \n",
+ "\n",
+ "#initialisation of variables\n",
+ "n = 4\n",
+ "r = 1.278 #in \u00c5\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "a = (4*r)/(math.sqrt(2)) #in\u00c5\n",
+ "a = a * 10**-10 #in m\n",
+ "V = (a)**3 #in m^3\n",
+ "At_W = 63.5 #atomic weight\n",
+ "N_A = 6.023*10**23\n",
+ "m = At_W /N_A #in gm\n",
+ "m = m*10**-3 #in kg\n",
+ "Rho = ((m*n)/V)/1000 #in kg/m^3\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Density of the crystal in kg/m^3 is =%.2f kg/m^3' %Rho)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density of the crystal in kg/m^3 is =8.93 kg/m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page No 43 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Finding Wavaelength of X ray\n",
+ "\n",
+ "import math\n",
+ "from numpy import *\n",
+ "#initialisation of variables\n",
+ "d=2.82 #in \u00c5\n",
+ "d=d*10**-10 #in m\n",
+ "n=1\n",
+ "theta1=10 #n degree\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "lembda=2*d*math.sin(math.radians(theta1)) #in m\n",
+ "lembda=lembda*10**10 #in \u00c5\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Wavaelength of X ray is =%.2f \u00c5 degrees' %lembda)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavaelength of X ray is =0.98 \u00c5 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6, Page No 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Finding The spacing of atomic layer\n",
+ "\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "lembda = 1.6 #in \u00c5\n",
+ "theta = 14.2 #in degree\n",
+ "n = 1\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "d = (n*lembda)/(2*math.sin(math.radians(theta))) #in \u00c5\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The spacing of atomic layer in crystal is =%.2f in \u00c5 degrees' %d)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The spacing of atomic layer in crystal is =3.26 in \u00c5 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7 Page No 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding The interplanner spacing\n",
+ "\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "n = 1\n",
+ "theta1 = 30 #in degree\n",
+ "lembda = 1.78 #in \u00c5\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "d = (n*lembda)/(2*math.sin(math.radians(theta1))) #in \u00c5\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The interplanner spacing is =%.2f in \u00c5 degrees' %d)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The interplanner spacing is =1.78 in \u00c5 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8 Page No 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding Interplaner spacing of the crystal\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "lembda = 0.58 #in \u00c5\n",
+ "n = 1;\n",
+ "theta1 = 6.45 # in degree\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "d = (n*lembda)/(2*math.sin(math.radians(theta1))) #in \u00c5 \n",
+ "print('Part (i) : At angle of 6.45\u00b0, Interplaner spacing of the crystal is =%.2f \u00c5' %d)\n",
+ "theta2 = 9.15 #in degree\n",
+ "d1 = (n*lembda)/(2*math.sin(math.radians(theta2))) #in \u00c5 \n",
+ "print('Part (ii) : At angle of 9.15\u00b0, Interplaner spacing of the crystal is =%.2f \u00c5' %d1)\n",
+ "theta3 = 13 #in degree\n",
+ "n2 = 1\n",
+ "d2 = (n2*lembda)/(2*math.sin(math.radians(theta3))) #in \u00c5\n",
+ "print('Part (iii) : At angle of 13\u00b0, Interplaner spacing of the crystal is =%.2f \u00c5' %d2)\n",
+ "n=2\n",
+ "d2 = (n*lembda)/(2*math.sin(math.radians(theta3))) #in \u00c5 \n",
+ "\n",
+ "#RESULTS\n",
+ "print('Part (iv) : : The interplaner spacing is : =%.4f \u00c5' %d2)\n",
+ "print('The interplaner spacing for some other set of reflecting is : =%.2f \u00c5' %d1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (i) : At angle of 6.45\u00b0, Interplaner spacing of the crystal is =2.58 \u00c5\n",
+ "Part (ii) : At angle of 9.15\u00b0, Interplaner spacing of the crystal is =1.82 \u00c5\n",
+ "Part (iii) : At angle of 13\u00b0, Interplaner spacing of the crystal is =1.29 \u00c5\n",
+ "Part (iv) : : The interplaner spacing is : =2.5783 \u00c5\n",
+ "The interplaner spacing for some other set of reflecting is : =1.82 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.9, Page No 44 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding The glancing angle for a cubic in degree\n",
+ "\n",
+ "import math\n",
+ "from sympy.mpmath import *\n",
+ "import cmath\n",
+ "\n",
+ "#initialisation of variables\n",
+ "a = 2.814 #in \u00c5\n",
+ "l = 0\n",
+ "h = l\n",
+ "k = 0\n",
+ "d=a #in \u00c5\n",
+ "n = 2\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "lembda=0.710 #in \u00c5\n",
+ "theta = math.degrees(math.asin(n*lembda/(2*d)))\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The glancing angle for a cubic in degree is : =%.2f \u00c5 degrees' %theta)\n",
+ "print('Anwser is in points i.e = 14 36\"40\"..')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The glancing angle for a cubic in degree is : =14.61 \u00c5 degrees\n",
+ "Anwser is in points i.e = 14 36\"40\"..\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.10 Page No 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding Wavelength of X ray\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "a = 3.65 #in \u00c5\n",
+ "a = 3.65*10**-10 #in m\n",
+ "h = 1\n",
+ "k = 0\n",
+ "l = 0\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "d= a/(math.sqrt(h**2+k**2+l**2)) #in m\n",
+ "n = 1\n",
+ "theta=60 #in degree\n",
+ "lembda = 2*d*math.sin(math.radians(theta)) #in m\n",
+ "lembda = lembda * 10**10 #in \u00c5\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Wavelength of X ray is : =%.2f \u00c5' %lembda)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of X ray is : =6.32 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.11 Page No 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding The glancing angle in degree\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "lembda = 1.54 #in \u00c5\n",
+ "density = 9.024 #in gm/cc\n",
+ "n = 1\n",
+ "MI = 100\n",
+ "At_W = 63.54 #atomic weight\n",
+ "N_A = 6.023*10**23 \n",
+ "m = At_W/N_A #in gm\n",
+ "a =(density*m)**(1.0/3) #in cm\n",
+ "h = 1\n",
+ "k = 0\n",
+ "l = 0\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "d= a/(math.sqrt(h**2+k**2+l**2))\n",
+ "theta =math.degrees((lembda*10**-8)/(2*d)) #in degree\n",
+ "\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The glancing angle is = %.2f degrees' %theta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The glancing angle is = 4.48 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.12 Page No 45 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding To get the 2nd order spectrum the position of the detector in degree\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "a = 3.615 #in \u00c5\n",
+ "theta=22 #in degree\n",
+ "n=1\n",
+ "h=1\n",
+ "k=h\n",
+ "l=k\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "d = a/(math.sqrt( ((h)**2) + ((k)**2) + ((l)**2) )) #in \u00c5\n",
+ "lembda = 2*d*math.sin(math.radians(theta)) #in \u00c5\n",
+ "print('The wavelength of X ray is = %.2f \u00c5 ' %lembda)\n",
+ "theta2 =math.degrees(math.asin(lembda/d)) #in degree\n",
+ " #in degree\n",
+ "\n",
+ "#RESULTS\n",
+ "print('To get the 2nd order spectrum the position of the detector is = %.2f degrees ' %theta2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wavelength of X ray is = 1.56 \u00c5 \n",
+ "To get the 2nd order spectrum the position of the detector is = 48.52 degrees \n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.13, Page No 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "n = 1\n",
+ "lembda = 1.54 # in \u00c5\n",
+ "theta = 21.7 # in degree\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "d = lembda/(2*math.sin(math.radians(theta))) # in \u00c5\n",
+ "h = 1\n",
+ "k = h\n",
+ "l = k\n",
+ "a = d*math.sqrt(h**2+k**2+l**2) # in \u00c5\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Lattice constant is = %.2f in \u00c5 ' %a)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lattice constant is = 3.61 in \u00c5 \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.14, Page No 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "h = 2\n",
+ "k = 1\n",
+ "l = 1\n",
+ "a = 4.8 # in \u00c5\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "d_211 = a/(math.sqrt(h**2+k**2+l**2)) #in \u00c5\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The distance between planes is =%.2f \u00c5 ' %d_211)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance between planes is =1.96 \u00c5 \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.15, Page No 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "r = 1.28 # in \u00c5\n",
+ "n = 4\n",
+ "M = 63.5\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "a = (4*r)/(math.sqrt(2)) #in \u00c5\n",
+ "a = a * 10**-8 # in cm\n",
+ "N_A = 6.023*10**23 \n",
+ "Rho = (n*M)/( N_A*((a)**3) ) # in gm/cc\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Density is =%.2f gm/cc ' %Rho)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density is =8.89 gm/cc \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.16, Page No 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variables\n",
+ "M = 55.85\n",
+ "a = 2.9 # in \u00c5\n",
+ "Rho = 7.87 #in gm/cc\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "a = a * 10**-8 # in cm\n",
+ "N_A = 6.023*10**23\n",
+ "n = (Rho*N_A*((a)**3))/M # atom per unit\n",
+ "\n",
+ "#RESULTS\n",
+ "print('A lattice having =%.2f atom per unit cell is a BCC structure ' %n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A lattice having =2.07 atom per unit cell is a BCC structure \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.17, Page No 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "M = 60.0 # in gm/mole\n",
+ "Rho = 6.23 # in gm/cc\n",
+ "n = 4\n",
+ "N_A = 6.023*10**23 \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "a = ((n*M)/(N_A * Rho))**(1.0/3) # in cm\n",
+ "r = (a*math.sqrt(2))/n #radius of atom in cm\n",
+ "r = r * 10**8 # in \u00c5\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Radius of atom is =%.2f \u00c5 ' %r)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius of atom is =1.41 \u00c5 \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.18, Page No 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Rho = 5.96 # in gm/cc\n",
+ "M = 50.0\n",
+ "n = 2\n",
+ "N_A = 6.023*10**23 \n",
+ "\n",
+ "#CALCULATIONS\n",
+ "a =((n*M)/(Rho*N_A))**(1.0/3) # in cm\n",
+ "r = (a*math.sqrt(3))/4 # in cm\n",
+ "P_f = (2*(4.0/3)*math.pi*((r)**3))/((a)**3) # packing factor\n",
+ "\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Packing factor is =%.2f ' %P_f)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Packing factor is =0.68 \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.19, Page No 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variables\n",
+ "M = 120.0\n",
+ "n = 2.0\n",
+ "N_A = 6.023*10**23\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "m1 = M/N_A #mass of 1 atom in gm\n",
+ "m2 = n*m1 #mass of unit cell in gm\n",
+ "\n",
+ "#RESULTS\n",
+ "print('Number of unit cell in 20 gms of element is : =%.2f X 10^22 unit cells ' %((20/m2)/(10**22)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of unit cell in 20 gms of element is : =5.02 X 10^22 unit cells \n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.20, Page No 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Rho = 2.48 # in gm/c.c\n",
+ "n = 4.0 \n",
+ "M = 58\n",
+ "N_A = 6.023*10**23\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "a = ( (n*M)/(Rho*N_A) )**(1.0/3) # in cm\n",
+ "a = a * 10**8 # in \u00c5\n",
+ "r = (a*math.sqrt(2))/n # in \u00c5\n",
+ "r = 2*r # in \u00c5\n",
+ "\n",
+ "#RESULTS\n",
+ "print('The center to center distance between ions is =%.2f \u00c5' %r)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The center to center distance between ions is =3.80 \u00c5\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |