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