#Given
#Variable declaration
b=120 #Width of plate in mm
t=20 #Thickness of plate in mm
R=10*10**3 #Radius of curvature in mm
E=2e5 #Young's modulus in N/sq.mm
#Calculation
I=b*t**3/12 #Moment of inertia in mm^4
y_max=t/2 #Maximum distance in mm
sigma_max=int((E/R)*y_max) #Maximum stress in N/sq.mm
M=round((E/R*I)*(10**-6),1) #Bending moment in kNm
#Result
print "Maximum stress =",sigma_max,"N/mm^2"
print "Bending moment =",M,"kNm"
from __future__ import division
import math
#Given
#Variable declaration
W=20*1000 #Total load in N
L=3.6 #Span in m
sigma_max=7 #Maximum stress in N/sq.mm
#Calculation
M1=W*L/8*1e3 #Maximum Bending moment in Nmm
b1=round((M1*3/(sigma_max*2))**(1/3),1) #Breadth of the beam in mm
d1=int(round(2*b1,0)) #depth of the beam in mm
M2=W*L/4*1e3 #Maximum Bending moment in Nmm
b2=float(str(round((M2*3/(sigma_max*2))**(1/3),4))[:6]) #Breadth of the beam in mm
d2=2*b2 #depth of the beam in mm
#Result
print "Dimensions of the cross-section:"
print "Breadth of beam =",b1,"mm"
print "Depth of beam",d1,"mm"
print "Dimensions of the cross-section when the beam carries a point load at the centre:"
print "Breadth of beam =",b2,"mm"
print "Depth of beam",d2,"mm"