{
 "metadata": {
  "name": "",
  "signature": "sha256:f048d58df41f2578c151ef59f03652004b6758b9e666d170255be2c66115bfe2"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "2: Particle nature of radiation"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.1, Page number 28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "h=6.626*10**-34;    #planck's constant(Js)\n",
      "new=100*10**6;    #frequency(Hz)\n",
      "P=100*10**3;    #power(watt)\n",
      "\n",
      "#Calculation\n",
      "E=h*new;    #quantum of energy(J)\n",
      "n=P/E;    #number of quanta emitted(per sec)\n",
      "\n",
      "#Result\n",
      "print \"number of quanta emitted is\",round(n/10**29,2),\"*10**29 per sec\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "number of quanta emitted is 15.09 *10**29 per sec\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.2, Page number 31"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "h=6.626*10**-34;    #planck's constant(Js)\n",
      "c=3*10**8;    #velocity of light(m/sec)\n",
      "lamda=400*10**-9;    #wavelength(m)\n",
      "e=1.6*10**-19;   #conversion factor from J to eV\n",
      "w0=2.28;    #work function(eV)\n",
      "m=9.1*10**-31;    #mass of electron(kg)\n",
      "\n",
      "#Calculation\n",
      "E=h*c/(lamda*e);    #energy(eV)\n",
      "KEmax=E-w0;    #maximum kinetic energy(eV)\n",
      "v2=2*KEmax*e/m;  \n",
      "v=math.sqrt(v2);   #velocity(m/s)\n",
      "\n",
      "#Result\n",
      "print \"maximum kinetic energy is\",round(KEmax,3),\"eV\"\n",
      "print \"velocity of photoelectrons is\",round(v/10**5,2),\"*10**5 m/s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "maximum kinetic energy is 0.826 eV\n",
        "velocity of photoelectrons is 5.39 *10**5 m/s\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.3, Page number 31"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "h=6.626*10**-34;    #planck's constant(Js)\n",
      "c=3*10**8;    #velocity of light(m/sec)\n",
      "lamda=2000*10**-10;    #wavelength(m)\n",
      "e=1.6*10**-19;   #conversion factor from J to eV\n",
      "w0=4.2;    #work function(eV)\n",
      "\n",
      "#Calculation\n",
      "lamda0=h*c/(w0*e);   #cut off wavelength(m)\n",
      "E=h*c/(lamda*e);    #energy(eV)\n",
      "sp=E-w0;    #stopping potential(eV)\n",
      "\n",
      "#Result\n",
      "print \"cut off wavelength is\",int(lamda0*10**10),\"angstrom\"\n",
      "print \"stopping potential is\",round(sp,2),\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "cut off wavelength is 2958 angstrom\n",
        "stopping potential is 2.01 V\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.4, Page number 33"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "h=6.626*10**-34;    #planck's constant(Js)\n",
      "c=3*10**8;    #velocity of light(m/sec)\n",
      "lamda=0.2*10**-9;    #wavelength(m)\n",
      "\n",
      "#Calculation\n",
      "p=h/lamda;    #momentum(kg m/s)\n",
      "m=p/c;   #effective mass(kg)\n",
      "\n",
      "#Result\n",
      "print \"momentum is\",round(p*10**24,1),\"*10**-24 kg m/s\"\n",
      "print \"effective mass is\",round(m*10**32,1),\"*10**-32 kg\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "momentum is 3.3 *10**-24 kg m/s\n",
        "effective mass is 1.1 *10**-32 kg\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.5, Page number 35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "h=6.626*10**-34;    #planck's constant(Js)\n",
      "c=3*10**8;    #velocity of light(m/sec)\n",
      "lamda=0.15;    #wavelength(nm)\n",
      "m0=9.1*10**-31;    #mass of electron(kg)\n",
      "theta1=0;   #scattering angle1(degrees)\n",
      "theta2=90;   #scattering angle2(degrees)\n",
      "theta3=180;   #scattering angle3(degrees)\n",
      "\n",
      "#Calculation\n",
      "theta1=theta1*math.pi/180;   #scattering angle1(radian)\n",
      "theta2=theta2*math.pi/180;   #scattering angle2(radian)\n",
      "theta3=theta3*math.pi/180;   #scattering angle3(radian)\n",
      "lamda_dash1=lamda+(h*(1-math.cos(theta1))/(m0*c));   #wavelength at 0(nm)\n",
      "lamda_dash2=lamda+(10**9*h*(1-math.cos(theta2))/(m0*c));   #wavelength at 90(nm)\n",
      "lamda_dash3=lamda+(10**9*h*(1-math.cos(theta3))/(m0*c));   #wavelength at 180(nm)\n",
      "\n",
      "#Result\n",
      "print \"wavelength at 0 degrees is\",lamda_dash1,\"nm\"\n",
      "print \"wavelength at 90 degrees is\",round(lamda_dash2,3),\"nm\"\n",
      "print \"wavelength at 180 degrees is\",round(lamda_dash3,3),\"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength at 0 degrees is 0.15 nm\n",
        "wavelength at 90 degrees is 0.152 nm\n",
        "wavelength at 180 degrees is 0.155 nm\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.6, Page number 36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "h=6.626*10**-34;    #planck's constant(Js)\n",
      "c=3*10**8;    #velocity of light(m/sec)\n",
      "e=1.6*10**-19;   #conversion factor from J to eV\n",
      "E=2*0.511*10**6;   #rest energy(eV)\n",
      "\n",
      "#Calculation\n",
      "lamda=h*c/(E*e);    #wavelength of photon(m)\n",
      "\n",
      "#Result\n",
      "print \"wavelength of photon is\",round(lamda*10**12,2),\"*10**-12 m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength of photon is 1.22 *10**-12 m\n"
       ]
      }
     ],
     "prompt_number": 21
    }
   ],
   "metadata": {}
  }
 ]
}