{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 1 Atomic Structure"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_1 pgno:6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Atomic weight of 12.0111 for Natural Carbon shows that the 12C nuclide must be present to a larger extent.\n",
      "\n",
      "Let 100 atoms of natural carbon contain x atoms of 12C nuclide.\n",
      "\n",
      "Percentage of 12C in Natural carbon=X= 98.894\n",
      "\n",
      "Percentage of 13C in Natural carbon= 1.106\n"
     ]
    }
   ],
   "source": [
    "print'The Atomic weight of 12.0111 for Natural Carbon shows that the 12C nuclide must be present to a larger extent.'\n",
    "print'\\nLet 100 atoms of natural carbon contain x atoms of 12C nuclide.\\n'\n",
    "X=(13.0034-12.0111)*100/(13.0034-12.0000);#percentage of 12C in natural carbon#\n",
    "print'Percentage of 12C in Natural carbon=X=',round(X,3)\n",
    "Y=100-X;#percentage of 13C in natural carbon#\n",
    "print'\\nPercentage of 13C in Natural carbon=',round(Y,3)\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_2 pgno:9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Frequency of radiation=v=Teracycles per sec=1.0*10**15Hz 1000.0\n",
      "\n",
      "Wavenumber of radiation=v1=3.3*10**4 per centimeter\n"
     ]
    }
   ],
   "source": [
    "C=3*10**2;#velocity of light in megametre/sec#\n",
    "L=300*10**-9;#wavelength of radiation in metres#\n",
    "v=C*10**-6/L;#frequency of radiation in Teracycles per sec#\n",
    "print'Frequency of radiation=v=Teracycles per sec=1.0*10**15Hz',v\n",
    "v1=1/L;#wave number of radiation in per meter#\n",
    "print'\\nWavenumber of radiation=v1=3.3*10**4 per centimeter'\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_3 pgno:12"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "velocity of electron in motion=v= Kilocm per sec=5.47*10**7cm per sec 54671.848\n",
      "\n",
      "Threshold energy of electron=W=eV 1.999\n",
      "\n",
      "Threshold frequency=v0=Tera per sec=4.83*10**14per sec 482.717\n"
     ]
    }
   ],
   "source": [
    "V=0.85;#external voltage in volts#\n",
    "e=1.6*10**-19;#electron charge in coloumbs#\n",
    "m=9.1*10**-28;#electron mass in grams#\n",
    "v=(2*V*e*10/m)**0.5;#velocity of electron in motion in Kilocm per sec#\n",
    "print'velocity of electron in motion=v= Kilocm per sec=5.47*10**7cm per sec',round(v,3)\n",
    "W=(3.198*10**-12)/(1.6*10**-12);#Threshold energy in eV#\n",
    "print'\\nThreshold energy of electron=W=eV',round(W,3)\n",
    "v0=(3.198*10**-12)/(6.625*10**-15);#Threshold frequency in tera per sec#\n",
    "print'\\nThreshold frequency=v0=Tera per sec=4.83*10**14per sec',round(v0,3)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_4 pgno:13"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "wavelength required to cause ionization=l=Angstrums 2405.206\n"
     ]
    }
   ],
   "source": [
    "E=118.5*10**3*4.2*10**7;#energy of ions in ergs#\n",
    "C=3*10**10;#velocity of light in cm/sec#\n",
    "L=6.023*10**23;#Avagadro number#\n",
    "h=6.625*10**-27;#plank's constant#\n",
    "l=(L*h*C*10**8)/E;\n",
    "print'wavelength required to cause ionization=l=Angstrums',round(l,3)\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_5 pgno:17"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "wavelength of the second line in balmer series=l=Angstrums 4884.793\n"
     ]
    }
   ],
   "source": [
    "n1=2.;\n",
    "n2=4.;\n",
    "dE=21.7*(10**-12)*((1/n1**2)-(1/n2**2));\n",
    "h=6.625*10**-27;#plank's constant#\n",
    "C=3*10**10;#velocity of light in cm/sec#\n",
    "l=h*C*10**8/dE;#Wavelength of second line in balmer series in Angstrums#\n",
    "print'wavelength of the second line in balmer series=l=Angstrums',round(l,3)#here the answer given in textbook is slightly wrong the original answer should be the one comes through execution#\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_6 pgno:18"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ionisation potential for an electron=dE=eV 13.563\n"
     ]
    }
   ],
   "source": [
    "n1=1;\n",
    "dE=21.7*(10**-12)/(1.6*10**-12*n1**2);#energy required to promote an electron from ground to infinity in eV#\n",
    "print'Ionisation potential for an electron=dE=eV',round(dE,3)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_7 pgno:20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DeBroglie Wavelength of CricketBall=l==1.95*10**-24Angstrums 1.94852941176e-32\n"
     ]
    }
   ],
   "source": [
    "h=6.625*10**-27;#plank's constant#\n",
    "V=2*10**3;#velocity of Cricket Ball in cm/sec#\n",
    "m=170;#weight of Cricket Ball in grams#\n",
    "l=h/(m*V);#DeBroglie Wavelength of CricketBall in Angstrums#\n",
    "print'DeBroglie Wavelength of CricketBall=l==1.95*10**-24Angstrums',l\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_8 pgno:21"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Bohr radius in second state=r2=2.12*10**-8cm\n",
      "\n",
      "Electron velocity in second state=v2=cm per sec 109189724.953\n",
      "\n",
      "De Broglie wavelength of electron in second state=l=Angstrums 6.66017642561\n",
      "\n",
      "Velocity of moving electron in second state=v=cm per sec 5926738977.44\n",
      "\n",
      "De Broglie wavelength of moving electron in secondstate=l1=Angstrums 0.1227\n"
     ]
    }
   ],
   "source": [
    "from math import pi,sqrt\n",
    "r1=0.53*10**-8;#Bohr radius in cm#\n",
    "r2=4*r1;#Bohr radius in second state in cm#\n",
    "print'Bohr radius in second state=r2=2.12*10**-8cm'\n",
    "h=6.625*10**-27;#plank's constant#\n",
    "m=9.11*10**-28;#electron mass in grams#\n",
    "v2=h/(pi*m*r2);#electron velocity in second state in cm per sec#\n",
    "print'\\nElectron velocity in second state=v2=cm per sec',v2\n",
    "l=(h*10**8)/(m*v2);#De Broglie wavelength of electron in second state in Angstrums#\n",
    "print'\\nDe Broglie wavelength of electron in second state=l=Angstrums',l\n",
    "e=1.6*10**-12;#electron charge in ergs#\n",
    "v=sqrt((2*(10**4)*e)/m);#velocity of the moving electron in second state in cm/sec#\n",
    "print'\\nVelocity of moving electron in second state=v=cm per sec',v\n",
    "l1=(h*10**8)/(v*m);#De Broglie wavelength of moving elctron in Angstrums#\n",
    "print'\\nDe Broglie wavelength of moving electron in secondstate=l1=Angstrums',round(l1,4)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_9 pgno:21"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "momentum of electron=p=10.01*10**-20gram cm per sec\n",
      "\n",
      "Uncertainity in momentum=10.01*10**-22gram cm per sec\n",
      "\n",
      "Uncertainity in position=dx=Angstrum 52.61\n"
     ]
    }
   ],
   "source": [
    "from math import pi\n",
    "m=9.11*10**-28;#electron mass in grams#\n",
    "v=1.1*10**8;#velocity of electron in cm per sec#\n",
    "p=m*v;#momentum of electron in gram cm per sec#\n",
    "print'momentum of electron=p=10.01*10**-20gram cm per sec'\n",
    "dp=p*10**-2;#Uncertainity in momentum in gram cm per sec#\n",
    "print'\\nUncertainity in momentum=10.01*10**-22gram cm per sec'\n",
    "h=6.625*10**-27;#plank's constant#\n",
    "dx=(h*10**8)/(4*pi*dp);#Uncertainity in position in Angstrum#\n",
    "print'\\nUncertainity in position=dx=Angstrum',round(dx,2)\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1_10 pgno:24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Energy difference between two energy levels of particle=dE1=1*10**-44eV\n",
      "\n",
      "Energy difference between two energy levels of electron=dE2=eV 2.823\n"
     ]
    }
   ],
   "source": [
    "h=6.625*10**-27;#plank's constant#\n",
    "g=10**3;#particle mass in grams#\n",
    "l1=1.;#length of one dimensional box in cm#\n",
    "n1=1.;\n",
    "n2=2.;\n",
    "dE1=((n2**2-n1**2)*h**2)/(8*g*l1**2);#Energy difference between two energy levels of particle in eV#\n",
    "print'Energy difference between two energy levels of particle=dE1=1*10**-44eV'\n",
    "l2=2*10**-8;#length of one dimensional box in cm#\n",
    "m=9.11*10**-28;#electron mass in grams#\n",
    "dE2=((n2**2-n1**2)*h**2)/(8*m*l2**2*1.6*10**-11);#Energy difference between two energy levels of electron in eV#\n",
    "print'\\nEnergy difference between two energy levels of electron=dE2=eV',round(dE2,3)\n",
    " \n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
