{
 "metadata": {
  "name": "",
  "signature": "sha256:c0c85d5a39a8e445759e5cb8d2f67d6ba3787632cdef1705d098045c10def4f6"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6 :\n",
      "Photoelectric Effect"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.1 Page No : 191"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "h = 6.62*10**-34;      #Planck's constant(in m2*kg/s)\n",
      "c = 3*10**8;           #speed of light (in m/s)\n",
      "e = 1.6*10**-19;       #electron charge(in coulomb)\n",
      "Wavelength_1 = 2300*10**-10;\n",
      "Wavelength_2 = 1800*10**-10;\n",
      "\n",
      "# Calculation\n",
      "W = h*c/Wavelength_1;\t\t\t#Work function\n",
      "E_in = h*c/Wavelength_2;\n",
      "E = E_in-W;\t\t\t#kinetic energy of the ejected electron(in Joules)\n",
      "E_1 = E/e;\t\t\t#kinetic energy of the ejected electron(in eV)\n",
      "\n",
      "# Results\n",
      "print 'kinetic energy of the ejected electron in = %.1f eV'%E_1\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "kinetic energy of the ejected electron in = 1.5 eV\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.2 Page No : 191"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "h = 6.625*(10**(-34));\t#Planck's constant(in m2*kg/s)\n",
      "c = 3*10**8;\t\t\t#speed of light (in m/s)\n",
      "e = 1.602*10**-19;\t\t#electron charge(in coulomb)\n",
      "W = 2.3;\t\t\t    #work (in eV)\n",
      "\n",
      "# Calculation\n",
      "W_1 = W*e;\t\t\t#work (in joules)\n",
      "v_o = W_1/h;\t\t\t#threshold frequency(in Hz)\n",
      "Wavelength = (h*c/W_1)/10**(-10);\t\t\t#Wavelength in Angstrom\n",
      "\n",
      "# Results\n",
      "print 'threshold frequency(Hz) = %.2e'%v_o\n",
      "print 'Wavelength in %.0f Angstrom'%(round(Wavelength,-1))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "threshold frequency(Hz) = 5.56e+14\n",
        "Wavelength in 5390 Angstrom\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.3 Page No : 192"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "h = 6.625*(10**(-34));\t\t\t#Planck's constant(in m2*kg/s)\n",
      "c = 3*10**8;\t\t\t#speed of light (in m/s)\n",
      "e = 1.602*10**-19;\t\t\t#electron charge(in coulomb)\n",
      "\n",
      "# Calculation\n",
      "wavelength = 6800*10**-10;\t\t\t#wavelength of radiation\n",
      "v_o = c/wavelength;\t\t\t#frequency\n",
      "W = h*v_o;\t\t\t#Work function\n",
      "\n",
      "# Results\n",
      "print 'threshold frequency in = %.2e Hz'%v_o\n",
      "print 'work function of metal in = %.2e joule'%W\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "threshold frequency in = 4.41e+14 Hz\n",
        "work function of metal in = 2.92e-19 joule\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.4 Page No : 192"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "h = 6.625*(10**(-34));\t\t\t#Planck's constant(in m2*kg/s)\n",
      "c = 3.*10**8;\t\t\t#speed of light (in m/s)\n",
      "\n",
      "# Calculation\n",
      "L_r  = 150*8./100;\t\t\t#Lamp rating(in joule)\n",
      "wavelength = 4500.*10**-10;\t\t\t#in meter\n",
      "W = h*c/wavelength;\t\t\t#work function\n",
      "N = L_r/W;\t\t\t#number of photons emitted by lamp per second\n",
      "\n",
      "# Results\n",
      "print 'number of photons emitted by lamp per second = %.1e'%N\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "number of photons emitted by lamp per second = 2.7e+19\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.5 Page No : 193"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "h = 6.6*(10**(-34));\t\t\t#Planck's constant(in m2*kg/s)\n",
      "c = 3*10**8;\t\t\t#speed of light (in m/s)\n",
      "e = 1.6*10**-19;\t\t\t#electron charge(in coulomb)\n",
      "W = 2.24;\t\t\t#work function(in eV)\n",
      "\n",
      "# Calculation\n",
      "W_1 = W*e;\t\t\t#work function(in joule)\n",
      "v = (W_1/h)*10**-10;\t\t\t#frequency\n",
      "wavelength = c/v;\t\t\t#region of electrons spectrum is less than(in angstrom)\n",
      "\n",
      "# Results\n",
      "print 'region of electrons spectrum is less than %d angstrom'%round(wavelength,-1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "region of electrons spectrum is less than 5520 angstrom\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6 Page No : 193"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "h = 6.625*(10**(-34));\t\t\t#Planck's constant(in m2*kg/s)\n",
      "c = 3*10**8;\t\t\t#speed of light (in m/s)\n",
      "P_o = 10*10**3;\t\t\t#Power of radio receiver (in Watt)\n",
      "\n",
      "# Calculation\n",
      "v = 440*10**3;\t\t\t#Operating frequency\n",
      "E = h*v;\t\t\t#Energy of each electron\n",
      "N = P_o/E;\t\t\t#Number of photons emitted/sec\n",
      "\n",
      "# Results\n",
      "print 'Number of photons emitted/sec by radio receiver = %.1e'%N\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of photons emitted/sec by radio receiver = 3.4e+31\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.7 Page No : 193"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "W_t = 4.52;\t\t\t#Work function for tungesten(in eV)\n",
      "W_b = 2.5;\t\t\t#Work function for barrium(in eV)\n",
      "h = 6.62*(10**(-34));\t\t\t#Planck's constant(in m2*kg/s)\n",
      "c = 3*10**8;\t\t\t#speed of light (in m/s)\n",
      "\n",
      "# Calculation\n",
      "e = 1.6*10**-19;\t\t\t#electron charge(in coulomb)\n",
      "W_T = W_t*e;\t\t\t#Work function for tungesten(in Joule)\n",
      "W_B = W_b*e;\t\t\t#Work function for barrium(in Joule)\n",
      "Wavelength_T = (h*c/W_T)*10**10;\t\t\t#wavelength of light which can just eject electron from tungsten\n",
      "Wavelength_B = (h*c/W_B)*10**10;\t\t\t#wavelength of light which can just eject electron from barrium\n",
      "\n",
      "# Results\n",
      "print 'wavelength of light which can just eject electron from tungsten in = %.0f Angstrom'%Wavelength_T\n",
      "print 'wavelength of light which can just eject electron from barrium in = %.0f Angstrom'%Wavelength_B\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength of light which can just eject electron from tungsten in = 2746 Angstrom\n",
        "wavelength of light which can just eject electron from barrium in = 4965 Angstrom\n"
       ]
      }
     ],
     "prompt_number": 12
    }
   ],
   "metadata": {}
  }
 ]
}