import math
#initialisation of variables
p1 = 7.8 #ft
p2 = 6.0 #ft
p3 = 7.4 #ft
p4 = 6.5 #ft
p = 7.6 #ft
h = 1.0 #ft
h1 = 6.7 #ft
p5 = 3.3 #ft
#CALCULATIONS
D = p1-p2 #mgd
D1 = p1-p3 #mgd
D2 = p-p4 #mgd
D3 = p4+h #mgd
D4 = h1-p5 #mgd
D5 = 2.0 - 1.6
#RESULTS
print "1 . Deficiency : %.1f mgd"%D
print "2 . Deficiency : %.1f mgd"%D1
print "3 . Deficiency : %.1f mgd"%D2
print " Net added capacity = %.1f mgd"%(1.2 - 0.2)
print " Reinforced capacity : %.1f mgd"%(D3)
print "4 . Deficiency : %.1f mgd"%D4
print " Net added capacity : %.1f mgd"%(p5 - 0.3)
print " Reinforced capacity : %.1f mgd"%(p5+3)
print "5. Deficiency : %.1f mgd"%D5
print " Net added capacity : %.1f mgd"%(0.6 - 0.2 )
print " Reinforced capacity : %.1f mgd"%(1.6+0.4)
print 'the demand is taken = %.1f mgd'%(D3)
#initialisation of variables
w = 500. #ft
p = 20. #psig
h = 40. #psig
h1 = 1000. #in
q = 1250. #ft
g = 2.308/0.75 #ft
g1 = 2.308/1.00 #ft
s = 5200. #gpm
a = 250. #gpm
#CALCULATIONS
H = (h1-(1./2)*(w)) #ft
H1 = (h-p)*g #percent
Q = (q-(1./2)*(w)) #ft
Q1 = (h-p)*g1 #percent
S = s/a #gpm
#RESULTS
print 'the number of standard fire streams = %.1f gpm'%(S)
#initialisation of variables
h1 = 2.1*3 #ft
h2 = 2.1 #ft
h = 8.4 #ft
p = 1000. #ft
h3 = 5.7 #ft
h4 = 4.2*3 #ft
q = 4.2 #ft
s = 1.68 #ft
q1 = 1.33 #ft
#CALCULATIONS
A = p*h/h2 #ft
B = p*(h3+h4)/q #ft
C = p*(h1+h2)/s #ft
#RESULTS
print 'the equilent pipe for the Hazen willians coefficent = %.0f ft'%(A)
print 'the equilent pipe for the Hazen willians coefficent = %.0f ft'%(round(B,-1))
print 'the equilent pipe for the Hazen willians coefficent = %.0f ft'%(C)
#initialisation of variables
d = 10 #hr
p = 50000 #in
a = 7.5 #mgd
w = 0.75 #mg
s = 5.03 #mg
#CALCULATIONS
S = s/w #mg
P = S-s #mg
#RESULTS
print 'a steady gravity supply equal to maximum daily = %.2f mg'%(P)