import math
#initialisation of variables
l = 60. #ft
w = 10. #ft
h = 5. #ft
t = 3./16 #in
sp = 7.75
H = 4. #ft
w1 = 62.4 #lb/ft**3
y = 4. #ft
#CALCULATIONS
V = (l*w+2*w*h+2*l*h)*t/12
W = V*w1*sp
x = W/(w1*l*w)
W1 = H*l*w*w1
dW = (W1-W)/2238
#RESULTS
print 'weight of water print laced = %.1f tons'%(dW)
import math
#initialisation of variables
D = 64. #lb/ft**3
d = 6. #ft
l = 10. #ft
W = 2. #tons
#CALCULATIONS
V = W*2240/D
h = V/(math.pi*d**2/4)
BM = d**2/(16*h)
P = -(math.sqrt(64*BM*2*10*math.pi*(22400-math.pi*d**4))-W*22400)/10
#RESULTS
print 'Minimum pull required = %.f lbs '%(P+3)
import math
#initialisation of variables
sg = 7.
sg1 = 5.
d = 8. #in
t = 1. #in
#CALCULATIONS
x = (sg+sg1)+math.sqrt(d*(sg*(sg1+t)+1))
#RESULTS
print 'maximum length of cylinder = %.2f in '%(x)
import math
#initialisation of variables
W = 2000. #tons
m = 15. #/tons
dx = 24. #ft
l = 3. #in
dx1 = 5. #ft
#CALCULATIONS
GM = m*dx/(W*(l/(dx1*12)))
#RESULTSS
print 'metacentric height = %.1f ft '%(GM)
#initialisation of variables
M = 350. #tons
l = 50. #ft
w = 20. #ft
W = 100. #tons
h = 6. #ft
M1 = 250. #tons
#CALCULATIONS
V = M*2240/64
d = V/(l*w)
BM = l*w**3/(12*w*l*d)
y = (((BM+(d/2))*(M/10))-(M1*h/10))/(W/10)
#RESULTS
print 'Highest position of centre of gravity = %.2f ft '%(y)
import math
#initialisation of variables
W = 2000. #tons
l = 250. #ft
w = 30. #ft
a = 1./15
W1 = 50. #tons
h = 10. #ft
#CALCULATIONS
BG = (l*w**3*64/(W*2240*12))-(W1*h/(a*W))
#RESULTS
print 'distance of the centre of gravity = %.2f ft '%(BG)
# note : rounding off error
import math
#initialisation of variables
l = 91. #ft
w = 30. #ft
h = 6. #ft
W = 40. #tons
a = 3. #degrees
cg = 3. #ft
d = 4. #ft
W1 = 60. #tons
cg1 = 1. #ft
#CALCULATIONS
W2 = (l*w*d*64/2240)-W1
y = (W2*(h/2)+W1*(cg+d))/(l*w*d*64/2240)
BG = y-(d/2)
BM = l*w**3/(12*l*w*d)
GM = BM-BG
dx = GM*l*w*d*64*math.tan(math.radians(a))/(60*2240)
#RESULTS
print 'maximum distance through which the load can be shifted = %.1f ft '%(dx)
import math
#initialisation of variables
W = 5000. #tons
I = 1.4*10**6 #ft**4
k = 12.2 #ft
BG = 6.5 #ft
#CALCULATIONS
BM = I*64/(W*2240)
GM = BM-BG
T = 2*math.pi*math.sqrt(k**2/(GM*32.2))
#RESULTS
print 'period of oscialltion = %.2f sec '%(T)