#(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)
#(a)
#variable declaration
b=20.0 # Maximum output
a=4.0 # minimum output
op=16.0 # output in mA
#calculation
p=(op-a)*2/(b-a)
p_h=p*10.0
h=p_h-2-5
#result
print('(a)\nh = %dm'%h)
#(b)
#variable declaration
p1=1 # pressure applied
#calculation
t_op=((b-a)/2)*p1+4
#result
print('\n(b)\nTransmitter output =%d mA'%t_op)
#(c)
#variable declaration
p2=0.5 # applied pressure
#calculation
t_op1=((b-a)/2)*p2+4
#result
print('\n(c)\nTransmitter output =%d mA'%t_op1)
#(a)
#variable declaration
b=20.0 # Maximum output
a=4.0 # minimum output
op=16.0 # actual output
wt_l1=25.0 # water level (i)
#calculation
t_op=((b-a)/100)*(100-75)+4
#result
print('(a)\nWater level=+25cm\nTransmitter output = %d mA' %t_op)
#(b)
#calculation
wt_l2=-25.0 # water level (ii)
t_op2=((b-a)/100)*(100-25)+4
#result
print('\n(b)\nWater level=-25cm\nTransmitter output = %d mA' %t_op2)
#(c)
#Variable declaration
t_op3=12.0 # Transmitter output
#calculation
H=(100.0/(b-a))*(12-4)
#result
print('\n(c)\nHead Applied = %d cm\nLevel corresponding to 50 cm head =0 cm' %H)
#(a)
#variable declaration
a=5.0*10**-4 #area
l=8.0 #length
dens=6.0*1000.0 #density
#calculation
w=a*l*dens
#result
print('(a)\nWeight of the displacer if weighed in air = %d kg'%w)
#(i)
#variable declaration
sbr1=23.0 # spring balance reading
#calculation
wloss1=w-sbr1
L1=wloss1/(1000.0*a)
#result
print('\n(i)\tL1=%dm'%L1)
#(ii)
#variable declaration
sbr2=22.0 # spring balance reading
#calculation
wloss2=w-sbr2
L2=wloss2/(1000.0*a)
#result
print('\n(ii)\tL2=%dm'%L2)
#(iii)
#variable declaration
sbr3=21.0 # spring balance reading
#calculation
wloss3=w-sbr3
L3=wloss3/(1000.0*a)
#result
print('\n(iii)\tL3=%dm'%L3)
#(b)
#variable declaration
level=8.0 # level wen tank is full
#calculation
wt=a*level*1000.0
spring=w-wt
#result
print('\n(b):when the tank is full\nSpring Balance reading = %d kg'%spring)
#variable declaration
rho=1000.0 # density of water
v=3.0 # displaced volume of water
#calculation
Bw=rho*v
#Result
print('Buoyance Force(Bw) = %d kg'%Bw)
#variable declaration
rho=1000.0 # density of water
Bw=5000.0 # Buoyancy Force
#calculation
v=Bw/rho
#result
print('V = %d m^3' %v)
#variable declaration
rho=1000.0 # density of water
h=10.0 # height of liquid
#calculation
P=rho*h
#result
print('P = %d kg/m^2 = %d kg/cm^2 '%(P,P/10000))
#variable declaration
rho=1000.0 # density of water
h=15.0 # height of liquid
ex_p=1.0 # External pressure on liquid
#calculation
P=(rho*h/10000.0)+ex_p
#result
print('P = %.1f kg/cm^2' %P)
#variable declaration
rho=1000.0 # density of water
ex_p=0.5*10**4 # External pressure on liquid
P=1.6*10**4 #(rho*h/10000)+ex_p
#calculation
h=(P-ex_p)/1000.0
#result
print('h = %d m' %h)
#variable declaration
c2=100.0*10**-6 # capacitance in capacitance probe
r1=10.0*10**3 # value of resistor in bride
r2=100.0*10**3 # value of resistor in bride
r3=50.0*10**3 # value of resistor in bride
#calculation
Cx=r1*c2/r3
Cx=Cx*10**6
#result
print('Cx = %d microFarad'%Cx)
c=5.0
#calculation
l=Cx/c
#result
print('\nLevel on the probe = %dm'%l)