{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1:Materials Properties and Requirements "
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.1, page no-8"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Resistance of the wire\n",
      "\n",
      "import math\n",
      "#variable declaration\n",
      "r=0.45*10**-3           # radius of the wire\n",
      "L=0.3                   # length of the wire\n",
      "rho=17.0*10**-9         # resistivity of wire in ohm-m \n",
      "\n",
      "#Calculations\n",
      "R=rho*(L/(math.pi*r**2))\n",
      "\n",
      "#Result\n",
      "print('The resistance of the wire is %.3f ohm'%R)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The resistance of the wire is 0.008 ohm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.2, page no-8"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Extension of a wire\n",
      "\n",
      "import math\n",
      "#variable declaration\n",
      "r=1.25*10**-3         # radius of the wire in m\n",
      "L=3.0                 # length of wire in m\n",
      "F=4900.0              # applied force in Newton\n",
      "e=2.05*10**11         # modulus of elasticity\n",
      "\n",
      "#calculation\n",
      "s=F/(math.pi*r**2*e)\n",
      "\n",
      "#result\n",
      "print('strain = %.3f\\nTherefore, extension = %.3f m'%(s,s*3))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "strain = 0.005\n",
        "Therefore, extension = 0.015 m\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}