x=10000.0*10.0 #equivalnt to 10kg/cm^2
#result
print('(a)\n 10kg/cm^2 = %.0f mmWG' %x)
#(b)
#variable declaration
onemm_Hg=13.546 #pressure of 1 mm Hg
#calculation
y=10.0**5/onemm_Hg
y=y/10.0**3
#result
print('\n(b)\n10kg/cm^2 = 10^5 mmWG = %.2f * 10^3 mmHg' %y)
#(c)
#variable declaration
onebar=1.03 # 1 Bar presssure in kg/cm^2
#calculation
z=10.0/onebar
#result
print('\n(c)\n10kg/cm^2 = %.2f bars' %z)
#(a)
#variable Declaration
gamm=1000.0 # density of water
d=35.0 # depth of water
dens_Hg=13.546 # density of Hg
#calculation
press_in_kg_cm=gamm*d*10**-4
press_in_mmHg=gamm*d/dens_Hg
press_in_mmHg=press_in_mmHg/10**3
#result
print('(a)\nThe pressure at depth of %d meters in a water tank=%.1f kg/cm^2 = %.2f*10^3 mmHg'%(d, press_in_kg_cm, press_in_mmHg))
#(b)
#varible declaration
press_atm=1.03 #atmospheric pressure
#calculation
abspress=press_in_kg_cm+press_atm
abspress_mmHg=press_in_mmHg*1000.0+760.0
abspress_mmHg=abspress_mmHg/1000.0
#result
print('\n(b)\nAbsolute Pressure= %.2f kg/cm^2 Abs = %.2f*10^3 mmHg Abs'%(abspress, abspress_mmHg))
#varible declaration
egp=260.0 # equivalent gauge pressure
#calculation
abspress=760.0-egp
#result
print('Absolute Presssure = %d mmHg' %abspress)
#(a)
#variable declaration
p_diff=500.0 #pressure difference in mmHg
#calculations
pdiff=p_diff*13.546/10000
#Result
print('(a)\np1-p2 = %.3f kg/cm^2' %pdiff)
#(b)
#variable declaration
p1=6770.0 # Gauge pressure in mmWG
p_atm=10300.0 # atmospheric pressure
#calculation
abs_p1=p1+p_atm
#result
print('\n(b)If p2 is open to atmosphere:\nAbsolute Pressure P1 = %d mmWG abs.' %abs_p1)
#(c)
#variable declaration
P1=500.0 #mmHg absolute pressure
#calculations
P1_gauge=P1-760.0
#result
print('\n(c)If p2 is evacuated and sealed:\np1= %d mmHg gauge Pressure' %P1_gauge)
#variable declaration
spe_grav_water=1.0 # specific gravity of water
#calculation
spe_grav_X=spe_grav_water*100.0/50.0
wt_dens_water=1000.0
wt_dens_X=wt_dens_water*2.0
#result
print('Weight Density of X = %d kg/m^3' %wt_dens_X)
#variable declaration
A=1.0/20.0 # Area ratio
p_diff=1500.0 # pressure difference in mmWG
#result
print('(a)\nAs Delta_h=A2/A1*h << h and normally negligible for well type manometer')
print('hence, p1-p2 = h = %d =111 mmHg' %p_diff)
print('\n(b)\nh measured above the oriinal reference will be half of H, i.e. 111/2=55.5 mmHg')
print('(Since area of both legs are same)')
print('1 kg/cm^2 = 10 mWG\n')
#(a)
#variable declaration
press=10+2 #pressure read by the gauge
#result
print('\n(a)Bourdon Gauge is mounted 20 meters below water line:')
print('\nPressure read by the Gauge = %d kg/cm^2'%press)
#(b)
#variable declaration
press2=10-3 #pressure read by the gauge
#result
print('\n\n(b)Bourdon Gauge is located 30 meters above the water line:')
print('\nPressure read by the Gauge = %d kg/cm^2'%press2)
#Variable declaration
dens_water=1000.0 # water Density
h1=125.0 # height1 mm
h2=250.0 # height2 mm
d2=h1*dens_water/h2
#result
#a
print('(a)\nDensity of Liquid = %d kg/m^3' %d2)
print('\nSpecific Density of the liquid = %.1f' %(h1/h2))
#(b)
print('\n\n(b)\nIf Values of water and liquid interchanged:\n')
d3=h2*dens_water/h1
print('\nDensity of Liquid = %d kg/m^3' %d3)
print('\nSpecific Density of the liquid = %.1f' %(h2/h1))
import math
#variable Declaration
R=120.0 #resistance
l=122.0 #length
a=0.1 #area
R1=140.0 #resistance in ohm
#calculation
rho=R*a/l
l1=math.sqrt(R1*a*l/rho)
l1=round(l1,0)
#Result
print('Length l1 = %d meters' %l1)
A1=a*l/l1
print('\nArea A1 = %.4f mm^2' %A1)
c=0.57 #Constant
#(a)
#variable declaration
d=0.1 #distance between plates
di1=100.0 #Dielectric constant
di2=1000.0 #Dielectric constant
#calculation
c1=c*di1*10.0/d
c1=round(c1,0)
#result
print('(a)\nC1=%d pf' %c1)
#(b)
#calculation
c2=c*di2*10/d
#result
print('\n(b)\nC2=%d pf' %c2)
#(c)
#calculation
ds=0.09
c11=c*di1*10/ds
c12=c*di2*10/ds
#result
print('\n(c)\nC1 = %.1f pf\nC2 = %d pf'%(c11,c12))
#variable Declaration
A=1.0 #area
p1=10.0 #pressure
#calculation
W1=A*p1
#Result
print('W1 = %d kg' %W1)
print('\nWith the 4 standard weights of 10kg, 20kg, 30kg and 40kg')
#varable declaration
p1=10**-2 #pressure in torr
h1=20.0 #height in mm
#xalculation
K=p1/h1**2
p2=K*30**2
p2=p2*100.0
#Result
print('The unknown pressure p2 = %.2f * 10^-2 torr' %p2)