"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#(a)\n",
"\n",
"# variable declaration\n",
"p=1.5 # pressure applied\n",
"a=4.0 # mA corresponds to 0 kg/cm^2\n",
"b=20.0 # mA corresponds to 2 kg/cm^2\n",
"\n",
"#calculation\n",
"wh=(((b-a)/2)*p)+a\n",
"\n",
"#result\n",
"print('(a)just at the bottom level of the tank')\n",
"print('Water head applied to the transmitter =%d mA'%wh)\n",
"\n",
"#(b)\n",
"\n",
"#calculation\n",
"wh2=(((b-a)/2)*p)+2*a\n",
"\n",
"#result\n",
"print('\\n\\n(b)5m below the bottom of the tank')\n",
"print('Water head applied to the transmitter =%d mA' %wh2)\n",
"\n",
"#(c)\n",
"\n",
"#calculation\n",
"wh3=(((b-a)/2)*p)\n",
"\n",
"#result\n",
"print('\\n\\n(c)5m above the bottom of the tank')\n",
"print('Water head applied to the transmitter =%d mA'%wh3)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)just at the bottom level of the tank\n",
"Water head applied to the transmitter =16 mA\n",
"\n",
"\n",
"(b)5m below the bottom of the tank\n",
"Water head applied to the transmitter =20 mA\n",
"\n",
"\n",
"(c)5m above the bottom of the tank\n",
"Water head applied to the transmitter =12 mA"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"