{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 2 Generalized Configurations and Functional Descriptions of Measuring Instruments" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2_1 pgno:22" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ts=0.1\n", "ps=2.5\n", "dT=20\n", "the error in measurement is d percent\n", "0.007\n" ] } ], "source": [ "#Caption_Error in measurement\n", "#Ex_1 part_2 #page 22\n", "print (\"ts=0.1\")\n", "print (\"ps=2.5\")\n", "print (\"dT=20\")\n", "\n", "ts=0.1 #('enter the temperature sensitivity=:')\n", "ps=2.5 #('enter the pressure sensitivity(in units/MPa)=:')\n", "dT=20 #('enter the temperature change during pressure measurement=:')\n", "P=120 #('enter the pressure to be measured (in MPa)=:')\n", "error=(ts*dT)/(ps*P);\n", "print'the error in measurement is d percent\\n',round(error,3) " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2_2 pgno:23" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "the error in measurement is d percent\n", "0.017\n" ] } ], "source": [ "#Caption_Error in measurement\n", "#Ex_2 part_2 #page 23\n", "\n", "\n", "ts=0.5 #('enter the temperature sensitivity=:')\n", "ps=7.5 #('enter the pressure sensitivity(in units/MPa)=:')\n", "dT=40 #('enter the temperature change during pressure measurement=:')\n", "P=160 #('enter the pressure to be measured (in MPa)=:')\n", "error=(ts*dT)/(ps*P);\n", "print'the error in measurement is d percent\\n',round(error,3) " ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.9" } }, "nbformat": 4, "nbformat_minor": 0 }