import math
#Initilization of Variables
#Rectangle-1
b_1=10 #cm #width of Rectangle-1
d_1=2 #cm #breadth of Rectangle-1
a_1=40 #cm**2 #Area of Rectangle-1
y_1=1 #cm #Distance of centroid-1
#Rectangle-2
b_2=2 #cm #width of Rectangle-2
d_2=10 #cm #breadth of Rectangle-2
a_2=20 #cm**2 #Area of rectangle-2
y_2=7 #cm #Distance of centroid-2
#Rectangle-3
b_3=20 #cm #width of Rectangle-3
d_3=2 #cm #breadth of Rectangle-3
a_3=20 #cm**2 #Area of rectangle-3
y_3=13 #cm #Distance of centroid-3
#Calculation
Y_bar=((a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1) #cm #centre of gravity of section
Y_1=4.5 #cm #Distance of centroid of rectangle 1 to C.G
Y_2=1.5 #cm #Distance of centroid of rectangle 2 to C.G
Y_3=7.5 #cm #Distance of centroid of rectangle 3 to C.G
I_x_x_1=b_1*d_1**3*12**-1+a_1*Y_1**2 #moment of inertia of rectangle 1 about centroidal x-x axis of the section
I_x_x_2=b_2*d_2**3*12**-1+a_2*Y_2**2 #moment of inertia of rectangle 2 about centroidal x-x axis of the section
I_x_x_3=b_3*d_3**3*12**-1+a_3*Y_3**2 #moment of inertia of rectangle 3 about centroidal x-x axis of the section
I_x_x=I_x_x_1+I_x_x_2+I_x_x_3 #cm**4
#Result
print"Moment of Inertia of the section is",round(I_x_x,2),"cm**4"
import math
#Initilization of Variables
#Rectangle-1
b_1=2 #cm #width of Rectangle-1
d_1=12 #cm #breadth of Rectangle-1
a_1=24 #cm**2 #Area of Rectangle-1
y_1=6 #cm #Distance of centroid-1
#Rectangle-2
b_2=6 #cm #width of Rectangle-2
d_2=2 #cm #breadth of Rectangle-2
a_2=12 #cm**2 #Area of rectangle-2
y_2=1 #cm #Distance of centroid-2
#Rectangle-3
b_3=2 #cm #width of Rectangle-3
d_3=12 #cm #breadth of Rectangle-3
a_3=24 #cm**2 #Area of rectangle-3
y_3=6 #cm #Distance of centroid-3
#Calculation
Y_bar=((a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1) #cm #centre of gravity of section
Y_1=6 #cm #Distance of centroid of rectangle 1 to base
Y_2=1 #cm #Distance of centroid of rectangle 2 to base
Y_3=6 #cm #Distance of centroid of rectangle 3 to base
I_x_x_1=b_1*d_1**3*12**-1+a_1*Y_1**2 #moment of inertia of rectangle 1 about centroidal x-x axis of the section
I_x_x_2=b_2*d_2**3*12**-1+a_2*Y_2**2 #moment of inertia of rectangle 2 about centroidal x-x axis of the section
I_x_x_3=b_3*d_3**3*12**-1+a_3*Y_3**2 #moment of inertia of rectangle 3 about centroidal x-x axis of the section
I_x_x=I_x_x_1+I_x_x_2+I_x_x_3 #cm**4
#Result
print"Moment of Inertia of the section is",round(I_x_x,2),"cm**4"
import math
#Initilization of Variables
#Rectangle-1
b_1=12 #cm #width of Rectangle-1
d_1=2 #cm #breadth of Rectangle-1
a_1=24 #cm**2 #Area of Rectangle-1
y_1=1 #cm #Distance of centroid-1
#Rectangle-2
b_2=2 #cm #width of Rectangle-2
d_2=6 #cm #breadthof Rectangle-2
a_2=12 #cm**2 #Area of rectangle-2
y_2=5 #cm #Distance of centroid-2
#Rectangle-3
b_3=5 #cm #width of Rectangle-3
d_3=2 #cm #breadth of Rectangle-3
a_3=10 #cm**2 #Area of rectangle-3
y_3=9 #cm #Distance of centroid-3
#Calculation
Y_bar=((a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1) #cm #centre of gravity of section
Y_1=2.78 #cm #Distance of centroid of rectangle 1 to C.G
Y_2=1.22 #cm #Distance of centroid of rectangle 2 to C.G
Y_3=5.22 #cm #Distance of centroid of rectangle 3 to C.G
I_x_x_1=b_1*d_1**3*12**-1+a_1*Y_1**2 #moment of inertia of rectangle 1 about centroidal x-x axis of the section
I_x_x_2=b_2*d_2**3*12**-1+a_2*Y_2**2 #moment of inertia of rectangle 2 about centroidal x-x axis of the section
I_x_x_3=b_3*d_3**3*12**-1+a_3*Y_3**2 #moment of inertia of rectangle 3 about centroidal x-x axis of the section
I_x_x=I_x_x_1+I_x_x_2+I_x_x_3 #cm**4
#Result
print"Moment of Inertia of the section is",round(I_x_x,2),"cm**4"
import math
#Initilization of variables
D=10 #cm #diameter of circle
b=4 #cm #width of rectangle
d=4 #cm #breadth of rectangle
Y=1 #cm #Distance of centroid of rectangle 1 to C.G
a=16 #cm**2 #area of rectangle
#Calculations
I_x_x_1=pi*64**-1*(D**4) #cm**4 #moment of inertia of circle about x-x axis
I_x_x_2=b*d**3*12**-1+a*Y**2 #cm**4 #moment of inertia of rectangle about x-x axis
I_x_x=I_x_x_1-I_x_x_2 #cm**4 #Total moment of inertia of the section
#Result
print"Total moment of inertia of the section is",round(I_x_x,2),"cm**4"
import math
#Initilization of variables
b_1=10 #cm #Breadth of the triangle
h=9 #cm #Height of triangle
b_2=2 #cm #width of rectangle
d=3 #cm #Depth of rectangle
#Triangle ABC-1
a_1=45 #cm**2 #Area of triangle
y_1=3 #cm #C.G of triangle
#Rectanglar hole-2
a_2=6 #cm**2 #Area of rectangle
y_2=4.5 #cm #C.G of rectangle
#Calculations
#Using relations
Y_bar=((a_1*y_1-a_2*y_2)*(a_1-a_2)**-1) #cm
I_1=b_1*h**3*36**-1+a_1*(y_1-Y_bar)**2 #cm**4 #M.I of triangle ABC about x-x passing through C.G of section
I_2=b_2*d**3*12**-1+a_2*(y_2-Y_bar)**2 #cm**4 #M.I of rectangular hole about x-x passing through C.G of section
I=I_1-I_2 #cm**4 #M.I of whole section about x-x passing through the C.G
I_3=b_1*h**3*12**-1 #cm**4 #M.I of triangle ABC about the base BC
I_4=b_2*d**3*12**-1+a_2*y_2**2 #cm**4 #M.I of Rectangular hole about the base BC
I_5=I_3-I_4 #cm**4 #M.I of the whole section about the base BC
#Result
print"M.I of whole section about x-x passing through the C.G",round(I,2),"cm**4"
print"M.I of the whole section about the base BC is",round(I_5,2),"cm**4"
import math
#Initilization of variables
#Notifications has been changed as per requirement
h=8 #cm #height of triangle
b=8 #cm #breadth of triangle or diameter semicircle
d=4 #cm #diameter of circle enclosed
#Calculations
I_1=b*h**3*12**-1 #cm #moment of inertia of the triangle ABC about the axis AB
I_2=pi*b**4*128**-1 #cm ##moment of inertia of the semicircle about the axis AB
I_3=pi*d**4*64**-1 #cm #moment of inertia of circle about the circle about the axis
I=I_1+I_2-I_3 #cm #Moment of Inertia of the shaded area about the axia AB
#Result
print"Moment of Inertia of the shaded area is",round(I,2),"cm"
import math
#Initilization of variables
#Rectangle
a_1=600 #cm**2 #Area of the Rectangle
y_1=15 #cm #C.G of Rectangle
b=20 #cm #width of rectangle
d=30 #cm #depth of rectangle
D=15 #cm #Diameter of circle
#Circle
a_2=176.7 #cm**2 #Area of the circle
y_2=20 #cm #C.G of the circle
#Calculation
Y_bar=((a_1*y_1-a_2*y_2)*(a_1-a_2)**-1) #cm #Distance of C.G From the AB
Y_bar_1=2.1 #cm
Y_bar_2=7.1 #cm
I_1=b*d**3*12**-1 #cm**4 #M.I of the rectangle about its C.G and parallel to x-x axis
I_2=I_1+a_1*Y_bar_1**2
I_3=pi*D**4*64**-1+a_2*Y_bar_2**2 #cm**4 #M.I of circular section about x-x axis
I=I_2-I_3 #cm**4 #M.I of the section about x-x axis
#Result
print"M.I of the section about x-x axis",round(I,2),"cm**4"
import math
#Initilization of variables
d=90 #cm #Diameter of grindstone
t=10 #cm #thickness of grindstone
rho=0.0026 #Kg/cm**3 #Density
#calculations
#M=Mass of grindstone=Volume *Density=Area*Thickness*Density
M=pi*4**-1*d**2*t*rho #Kg
R=d*2**-1 #cm #radius
I_g=M*R**2*2**-1 #Kg*m**2
k=R*(2**0.5)**-1 #cm #Radius of gyration
#Result
print"Radius of gyration is",round(k,2),"cm"