{
 "metadata": {
  "name": "",
  "signature": "sha256:5e77310b83fb16f4b45eb92df638029fc5fbb7881beb71539bf2e332dc67f090"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 Diffraction of light"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1 Page no 85"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "w=6*10**-7\n",
      "a=12*10**-7\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "A=math.asin(w/a)*180/3.14\n",
      "\n",
      "#Result\n",
      "print\"Half angular width of central bright maxima is\",round(A,0),\"degree\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Half angular width of central bright maxima is 30.0 degree\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2 Page no 85"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "a =0.2*10**-3                      #m\n",
      "D =2.0                                # n m\n",
      "x=5*10**-3\n",
      "\n",
      "#Calculation\n",
      "w=(a*x)/D\n",
      "w1=w*1*10**10\n",
      "\n",
      "#Result\n",
      "print\"Wavelength of light is\", w1,\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Wavelength of light is 5000.0 A\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3 Page no 85"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "f=100                      #cm\n",
      "L=6000*10**-8\n",
      "d=0.01\n",
      "\n",
      "#Calculation\n",
      "x=1.22*f*L/d\n",
      "\n",
      "#Result\n",
      "print\"Separation is\",x,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Separation is 0.732 cm\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4 Page no 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "w=6*10**-7                          #m\n",
      "D=2\n",
      "x=5.0*10**-3\n",
      "\n",
      "#Calculation\n",
      "a=(w*D)/x\n",
      "\n",
      "#Result\n",
      "print\"Slit width is\", a*10**4,\"*10**-4 m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Slit width is 2.4 *10**-4 m\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5 Page no 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "w=589*10**-9\n",
      "D=1\n",
      "a=0.1*10**-3\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "A=math.asin(w/a)\n",
      "A1=2*A\n",
      "y=D*A1\n",
      "y1=y*100\n",
      "\n",
      "#Result\n",
      "print\"Angular width of central maxima is\", round(A1,3),\"radian\"\n",
      "print\"Linear width of central maxima is\",round(y1,3),\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Angular width of central maxima is 0.012 radian\n",
        "Linear width of central maxima is 1.178 cm\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.6 Page no 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "a=22.0*10**-5\n",
      "L=5500*10**-8\n",
      "n=1\n",
      "n1=2\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "a1=L/a\n",
      "A=math.asin(a1)*180/3.14\n",
      "a2=math.asin(2*L/a)*180/3.14\n",
      "\n",
      "#Result\n",
      "print\"Angular position of two minima is\",round(A,2), \"Degree and\", round(a2,0),\"Degree\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Angular position of two minima is 14.48 Degree and 30.0 Degree\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7 Page no 87"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "n=1\n",
      "L=5890*10**-10\n",
      "a=3*10**-4\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "A=math.asin((L/a)*180/3.14)\n",
      "A1=math.asin((3*L)/(2.0*a))*180/3.14\n",
      "\n",
      "#Result\n",
      "print\"Angle is\", round(A1*10**2,0),\"Degree\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Angle is 17.0 Degree\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.8 Page no 87"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "L=4890*10**-10\n",
      "a=5*10**-3\n",
      "f=0.4\n",
      "\n",
      "#Calculation\n",
      "x1=f*L/a\n",
      "x2=3*L*f/(2*a)\n",
      "x=x2-x1\n",
      "\n",
      "#Result\n",
      "print\"Distance between first dark fringe and new bright fringe is\", x,\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Distance between first dark fringe and new bright fringe is 1.956e-05 m\n"
       ]
      }
     ],
     "prompt_number": 40
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.9 Page no 88"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "L=5000*10**-8                #cm\n",
      "a=5000.0\n",
      "\n",
      "#Calculation\n",
      "n=1/(L*a)\n",
      "\n",
      "#Result\n",
      "print\"Highest order spectrum is\",n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Highest order spectrum is 4.0\n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.10 Page no 88"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "c=1/5000.0\n",
      "w1=5890*10**-8                         #cm\n",
      "n =2\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "theta = math.asin ((n*w1)/c)*180/3.14\n",
      "w2 =5896*10** -8\n",
      "theta1 = math.asin ((n*w2)/c)*180/3.14\n",
      "a= theta1 - theta \n",
      "w =5893*10**-8\n",
      "dw=w2 -w1\n",
      "N=w/( dw*n)\n",
      "N1= floor (N)\n",
      "\n",
      "#Result\n",
      "print\"(a) Angular width is\",round(theta,3),\"Degree\"\n",
      "print\"(b) Angular separation is\",round(a,3),\"Degree\"\n",
      "print\"(c) No. of lines is\",N1,\"Grating\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Angular width is 36.104 Degree\n",
        "(b) Angular separation is 0.043 Degree\n",
        "(c) No. of lines is 491.0 Grating\n"
       ]
      }
     ],
     "prompt_number": 42
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.11 Page no 89"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "w1=589*10**-9\n",
      "w2 =5896*10**-10 \n",
      "dw=w2-w1                               # change o f wave l eng th\n",
      "w=( w1+w2) /2.0                       #mid wavelength\n",
      "n =1\n",
      "\n",
      "#Calculation\n",
      "N=w/(n*dw)\n",
      "N1= floor (N)\n",
      "\n",
      "#Result\n",
      "print\"Number of lines is\", N1,\"grating\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of lines is 982.0 grating\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.12 Page no 89"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "n1=2\n",
      "n2=3.0\n",
      "L=6360                        #A\n",
      "\n",
      "#Calculation\n",
      "L2=n1*L/n2\n",
      "\n",
      "#Result\n",
      "print\"Wavelength is\",L2,\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Wavelength is 4240.0 A\n"
       ]
      }
     ],
     "prompt_number": 44
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.13 Page no 89"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "L1=5400*10**-8\n",
      "L2=4050.0*10**-8\n",
      "a=30                        #Degree\n",
      "b=1350.0*10**-8\n",
      "\n",
      "#Calculation\n",
      "A=b/(L1*L2*2)\n",
      "\n",
      "#Result\n",
      "print\"Number of lines is\", round(A,0)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of lines is 3086.0\n"
       ]
      }
     ],
     "prompt_number": 48
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.14 Page no 90"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "a=30                      #Degree\n",
      "L=5000*10**-8\n",
      "x=0.01                  #Radian\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "A=math.tan(a*3.14/180.0)\n",
      "X=1/A\n",
      "L1=L*x*X\n",
      "\n",
      "#Result\n",
      "print\"Difference in two wavelength is\", round(L1*10**8,1),\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Difference in two wavelength is 86.7 A\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.15 Page no 90"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "#Given\n",
      "c=1/4000.0                        # grating element\n",
      "w=5000*10**-8\n",
      "n =3\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "D=n/(c* math.sqrt (1 -((n*w/c)**2) ))\n",
      "\n",
      "#Result\n",
      "print\"Dispersive power is\",D*10**-4,\"*10**4 rad/sec\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Dispersive power is 1.5 *10**4 rad/sec\n"
       ]
      }
     ],
     "prompt_number": 59
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.16 Page no 90"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "a=30                   #Degree\n",
      "n=2.0\n",
      "A=5000.0\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "L=math.sin(a*3.14/180.0)/(n*A)\n",
      "\n",
      "#Result\n",
      "print\"Wavelength is\", round(L*10**8,0),\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Wavelength is 4998.0 A\n"
       ]
      }
     ],
     "prompt_number": 84
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.17 Page no 91"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "l =5                            #length of grating\n",
      "N =16000\n",
      "w =6000\n",
      "n =2.0\n",
      "\n",
      "#Calculation\n",
      "T=N*l\n",
      "R=T*n\n",
      "dw=w/(T*n)\n",
      "\n",
      "#Result\n",
      "print\"(a) Resolving power is\",R\n",
      "print\"(b) Wavelength is\",dw,\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Resolving power is 160000.0\n",
        "(b) Wavelength is 0.0375 A\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.18 Page no 91"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "w1=5500                         #A\n",
      "w2=5501\n",
      "n=2\n",
      "W1=8500\n",
      "W2=8501\n",
      "\n",
      "#Calculation\n",
      "w=(w1+w2)/2.0\n",
      "W=w2-w1\n",
      "N=w/W\n",
      "W11=(W1+W2)/2.0\n",
      "W12=W2-W1\n",
      "N1=W11/W12\n",
      "\n",
      "#Result\n",
      "print\"The required rosolving power\", N1,\"is less than the actual power\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required rosolving power 8500.5 is less than the actual power\n"
       ]
      }
     ],
     "prompt_number": 94
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.19 Page no 92"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "c =12.5*10**-5\n",
      "w=5*10**-5\n",
      "N =40000\n",
      "\n",
      "#Calculation\n",
      "n=c/w\n",
      "n1= floor (n)\n",
      "P=n1*N\n",
      "\n",
      "#Result\n",
      "print\"Resolving power is\",P"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resolving power is 80000.0\n"
       ]
      }
     ],
     "prompt_number": 87
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.20 Page no 92"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "n=2500.0\n",
      "w=0.5\n",
      "n1=1\n",
      "L=5890*10**-8\n",
      "a=5000\n",
      "L2=5896*10**-8\n",
      "L3=5893*10**-8\n",
      "c=6*10**-8\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "A=w/n\n",
      "A1=math.asin(L*a)*180/3.14\n",
      "A2=math.asin(L2*a)*180/3.14\n",
      "A3=A2-A1\n",
      "N=L3/c\n",
      "\n",
      "#Result\n",
      "print\"Angular separation between Two sodium lines are\", round(A1,1),\"degree and\",round(A2,1),\"degree\"\n",
      "print\"Number of lines required is\",round(N,0),\"lines\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Angular separation between Two sodium lines are 17.1 degree and 17.2 degree\n",
        "Number of lines required is 982.0 lines\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.21 Page no 93"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "l=2               #inches\n",
      "n=40000\n",
      "N=3\n",
      "\n",
      "#Calculation\n",
      "r=n*l\n",
      "p=N*r\n",
      "\n",
      "#Result\n",
      "print\"The resolving power in third order is\",p"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The resolving power in third order is 240000\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.22 Page no 93"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "N=40000.0\n",
      "a=12.5*10**-5\n",
      "w=80000\n",
      "\n",
      "#Calculation\n",
      "n=w/N\n",
      "L=a/n\n",
      "L1=L*10**8/(n*N)\n",
      "L2=L*10**8+L1\n",
      "\n",
      "#Result\n",
      "print\"Range of wavelength is\", round(L2,2),\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Range of wavelength is 6250.08 A\n"
       ]
      }
     ],
     "prompt_number": 35
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.23 Page no 93"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "L=0.5*10**-8\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "w=math.sin(10*3.14/180.0)*L/(math.cos(10*3.14/180.0)*(3/(60.0*60.0))*(math.pi/180.0))\n",
      "W=w+L\n",
      "N=W/(L*2)\n",
      "N1=(N*2*w)/(L*2)\n",
      "\n",
      "#Result\n",
      "print\"Minimum grating is\", round(w*10**5,0)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum grating is 6.0\n"
       ]
      }
     ],
     "prompt_number": 60
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.24 Page no 94"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "w=5000                            #A\n",
      "N=30000\n",
      "n=2.0\n",
      "\n",
      "#Calculation\n",
      "W=w/(n*N)\n",
      "\n",
      "#Result\n",
      "print\"Smallest wavelength separation is\", round(W,3),\"A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Smallest wavelength separation is 0.083 A\n"
       ]
      }
     ],
     "prompt_number": 64
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.25 Page no 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "f =50                        #focal length of convex lens in cm\n",
      "w=5*10**-5                    #wavelength used in cm\n",
      "n =1\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "r= math.sqrt (n*f*w)\n",
      "\n",
      "#Result\n",
      "print\"Radius is\",r,\"cm\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Radius is 0.05 cm\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.26 Page no 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "d =0.2                       #diameter of ring\n",
      "n =1\n",
      "w=5*10**-5\n",
      "\n",
      "#Calculation\n",
      "r=d/2.0\n",
      "f=(r**2) /(w*n)\n",
      "\n",
      "#Result\n",
      "print\"Position of brightest spot is\",f,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Position of brightest spot is 200.0 cm\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.27 Page no 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "f =1                              #focal length in m\n",
      "n =1\n",
      "w =5893*10**-10\n",
      "n1 =3\n",
      "n2=5\n",
      "\n",
      "#Calculation\n",
      "r= math.sqrt (n*f*w)\n",
      "r1= math.sqrt (n1*f*w)\n",
      "r2= math.sqrt (n2*f*w)\n",
      "\n",
      "#Result\n",
      "print\"Radius is\",round(r*10**4,2),\"*10**-4 m,\",round(r1*10**3,3),\"*10**-3 m,\",round(r2*10**3,3),\"*10**-3 m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Radius is 7.68 *10**-4 m, 1.33 *10**-3 m, 1.717 *10**-3 m\n"
       ]
      }
     ],
     "prompt_number": 72
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.28 Page no 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "f1=8\n",
      "w1=6000*10**-8\n",
      "w2=4800.0*10**-8\n",
      "\n",
      "#Calculation\n",
      "f2=f1*w1/w2\n",
      "\n",
      "#Result\n",
      "print\"Focal length is\",f2,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Focal length is 10.0 cm\n"
       ]
      }
     ],
     "prompt_number": 76
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.29 Page no 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "n=1\n",
      "\n",
      "#Calculation\n",
      "f1=n\n",
      "\n",
      "#Result\n",
      "print\"Principal focal length is\",f1,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Principal focal length is 1 cm\n"
       ]
      }
     ],
     "prompt_number": 78
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.30 Page no 96"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "r =200                         #radius of curvature in cm\n",
      "\n",
      "#Calculation\n",
      "f=r\n",
      "\n",
      "#Result\n",
      "print\"Principle focal length is\",f*10**-2,\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Principle focal length is 2.0 m\n"
       ]
      }
     ],
     "prompt_number": 74
    }
   ],
   "metadata": {}
  }
 ]
}