# Variables
x1 = 3. #in
x2 = 3. #in
x3 = 3. #in
x4 = 3. #in
x5 = 5. #in
x6 = 5. #in
x7 = 5. #in
x8 = 5. #in
L1 = 1. #in
L2 = 1. #in
L3 = 1. #in
L4 = 1. #in
L5 = 1. #in
L6 = 1. #in
L7 = 1. #in
L8 = 1. #in
y = 7.5 #in
# Calculations
Ix1 = x1*L1*(y)**2
Ix2 = x2*L2*(y-L2)**2
Ix3 = x3*L3*(y-L3-L2)**2
Ix4 = x4*L4*(y-L4-L3-L2)**2
Ix5 = x5*L5*(y-L5-L4-L3-L2)**2
Ix6 = x6*L6*(y-L6-L5-L4-L3-L2)**2
Ix7 = x7*L7*(y-L7-L6-L5-L4-L3-L2)**2
Ix8 = x8*L8*(y-L8-L7-L6-L5-L4-L3-L2)**2
Ix = Ix1+Ix2+Ix3+Ix4+Ix5+Ix6+Ix7+Ix8
# Results
print 'Ix = %.f in**4'%(Ix)
# Variables
Iy = 60 #in**4
A = 25 #sq in
x = 10 #in
# Calculations
Ia = Iy+ A*x**2
# Results
print 'I = %.f in**4'%(Ia)
import math
# Variables
L = 5 #in
B = 12 #in
Ix = 227 #in**4
Iy = 10 #in**4
A = 10.2 #sq in
# Calculations
Kx = math.sqrt(Ix/A)
Ky = math.sqrt(Iy/A)
# Results
print 'Radius of gyration wrt x = %.2f in'%(Kx)
print 'Radius of gyration wrt y =%.2f in'%(Ky)
# Variables
L1 = 8. #in
B1 = 1. #in
L2 = 1. #in
B2 = 6. #in
L3 = 8. #in
B3 = 1. #in
# Calculations
Iy = (B1*L1**3/12)+(B2*L2**3/12)+(B3*L3**3/12)
Ix = (L1*B1**3/12)+L1*B1*((B2/2)+(B1/2))**2+(L2*B2**3/12)+(L3*B3**3/12)+L3*B3*((B2/2)+(B3/2))**2
# Results
print 'Ix = %.2f in**4'%(Ix)
print 'Iy =%.2f in**4'%(Iy)
import math
# Variables
H = 8. #in
b = 6. #in
d = 4. #in
H1 = 5. #in
# Calculations
Ia1 = ((b*H**3)/12)+b*H*d**2
Ia2 = math.pi*((d/2)**2)+math.pi*((d/2)**2)*(H1)**2
I = Ia1-Ia2
# Results
print 'I = %.2f in**4'%(I)
import math
# Variables
W = 64.4 #lb
I = 10 #slugft**2
g = 32.2 #ft/sec**2
# Calculations
m = W/g
k = math.sqrt(I/m)
# Results
print 'k = %.2f ft'%(k)
import math
# Variables
d1 = 18. #in
d2 = 10. #in
d3 = 4. #in
Wpercuin = 0.31 #lb
L1 = 4. #in
L2 = 8. #in
g = 32.2 #ft/sec**2
# Calculations
m1 = math.pi*(d1/2)**2*L1*Wpercuin/g
I1 = m1*(d1/24)**2/2
m2 = math.pi*(d2/2)**2*L2*Wpercuin/g
I2 = m2*(d2/24)**2/2
m3 = math.pi*(d3/2**2)*(L1+L2)*Wpercuin/g
I3 = m3*(d3/24)**2/2
I = I1+I2-I3
# Results
print 'I = %.2f slug ft**2'%(I)