#calculate the mean velocity of flow at both the sections
#Initialization of variables
import math
gam=0.0765 #lb/ft^3
Q=100. #ft^3/sec
d1=2.5 #ft
d2=9. #in
l=12. #ft
#calculations
A1=math.pi/4. *d1*d1
V1=Q/A1
A2=math.pi*l*d2/12.
V2=Q/A2
#results
print '%s %.1f %s' %("Mean velocity of flow at section 1 =",V1,"ft/sec")
print '%s %.2f %s' %("\n Mean velocity of flow at section 2 =",V2,"ft/sec")
#calculate the horizontal and vertical components of velocity
#Initialization of variables
x=3.
y=1.
#calculations
u=-3*y*y
v=-6*x
#results
print '%s %d' %("Horizontal component of velocity = ",u)
print '%s %d' %("\n vertical component of velocity = ",v)