{
 "metadata": {
  "name": "",
  "signature": "sha256:16617b0214df1f3fa0b6950901fd2bc173679187633649259f00cd5dd8aa8d5e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4 : Temperature"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "\n",
      "Example 4.1 Page no. 92\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variable\n",
      "#(a)\n",
      "Temp_c=100. ;              #[degree Celsius]\n",
      "\n",
      "# Calculation and Result\n",
      "Temp_k=Temp_c+273 ;        #[K]\n",
      "print '(a) Temperature in kelvin is %.2f K'%Temp_k\n",
      "\n",
      "#(b)\n",
      "Temp_f=(100*(1.8/1)) +32 ;         #[degree Fahrenheit]\n",
      "print ' (b) Temperature in degree Fahrenheit is %.2f '%Temp_f\n",
      "\n",
      "#(c)\n",
      "Temp_r= Temp_f + 460 ;             #[degree Rankine ]\n",
      "print ' (c) Temperature in degree Rankine is %.2f '%Temp_r"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Temperature in kelvin is 373.00 K\n",
        " (b) Temperature in degree Fahrenheit is 212.00 \n",
        " (c) Temperature in degree Rankine is 672.00 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 4.2 Page no. 93\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "c = 139.1 + (1.56*10**-1)*(-460-32)/1.8 ;\n",
      "d = (1.56*10**-1)/1.8;\n",
      "\n",
      "# Calculation\n",
      "#Now convert c +dTR to (Btu/lb mol*degree R) to get answer of form a + bTR,where\n",
      "a = c*(454/(1055*1.8)) ;\n",
      "b = d*(454/(1055*1.8)) ;\n",
      "\n",
      "# Result\n",
      "print 'The required answer is %.2f + (%.2e)T Btu/(lb mol*degree R) , where T is in degree R .  '%(a,b)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required answer is 23.06 + (2.07e-02)T Btu/(lb mol*degree R) , where T is in degree R .  "
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": true,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}