import math
#Initialization of variables
weight = 9800. #Kg
g = 9.81 #m/s**2
a = 2. #m/s**2
#calculations
m = weight/g
Wm = m*a
#results
print "Density on earth = %.2f Kg/m**3"%(m)
print " Weight on moon = %.2f N"%(Wm)
print " Density on moon remains unchanged and is equal to %.2f Kg/m**3"%(m)
import math
#Initialization of variables
w = 150. #N
theta = 30. #degrees
l = 0.8 #m
b = 0.8 #m
dy = 0.12 #cm
v = 20. #cm/s
#calculations
Tau = round(w*math.sin(math.radians(theta)) /(l*b),2) #shear stress
rd = v/dy #rate of deformation
vis = Tau/rd #viscosity
#results
print "Viscosity of the fluid = %.2f N s/m**2"%(vis)
# incorrect solution for 'rate of deformation' in textbook
import math
#Initialization of variables
vis = 2.5/10 #N s/m**2
D = 15. #cm
N = 180.
dy = 0.0001 #m
l = 0.15 #length - m
b = 0.25 #breadth - m
r = 0.152 #radius - m
#calculations
dv = math.pi*D*N/60/100
Tau = vis*dv/dy
Tor = round(Tau*math.pi*l*b*r/2,1)
P = Tor*2*math.pi*N/60
print
#results
print "Power required = %d W"%(P)
# Note : The answer is different due to rounding off error in textbook.
import math
#Initialization of variables
w = 1 #rad/s
T = 0.4 #N/m**2
#calculations
mu = T/math.tan(w)
#results
print "Viscosity = %.2f N s/m**2"%(mu)
import math
#Initialization of variables
d = 0.05*10**-3 #diameter - m
T = 72.*10**-3 #surface tension of water - N/m
P = 101. #pressure - kN/m**2
#calculations
Pi = P*1000 + 2*T/(d/2)
#results
print "Pressure = %.2f kN/m**2"%(Pi/1000)
import math
#Initialization of variables
rho = 981. #dyn/cm**2
sigma = 72. #dyn/cm
theta = 0. #degrees
d = 0.5 #cm
depth = 90. #cm
#calculations
h = 4*sigma*math.cos(math.radians(theta)) /(rho*d)
Td = depth-h
#results
print "True depth = %.3f cm"%(Td)