import math
#Initialization of variables
k = 1.5
r = 40. #cm
theta = 45. #degrees
#calculations
vr = -2*k*r*math.cos(math.radians(2*theta))
vt = 2*k*r*math.sin(math.radians(2*theta))
#results
print "velocity in radial direction = %d cm/s"%(vr)
print " velcoity in angular direction = %d cm/s"%(vt)
import math
#Initialization of variables
T = 4.5 #m^2/s
a = 0.6 #diameter - m
u = 5. #velocity - m/s
rho = 1000. #kg/m**3
#calculations
sint = 0.5*(1- T/(2*math.pi*a*u))
theta = math.degrees(math.asin((sint)))
dp = 0.5*rho*u**2 *(1 - (2 + T/(2*math.pi*a*u))**2)
#results
print "Angle = %.1f or %.1f degrees"%(theta,180-theta)
print " Min guage pressure = %.2f kN/m**2"%(dp/1000)
#The answer in textbook is wrong. please check
import math
#Initialization of variables
T = 6*math.pi
r = 1./3
#calculations
vab = T/(4*math.pi)
vba = T/(2*math.pi)
w = vab/r
#results
print "rate of rotation = %.1f rad/s"%(w)
print "speed of A by B = %.1f m/s"%(vab)
print "speed of B by A = %.1f m/s"%(vba)