Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 4 : Complete the program. 1 0 Points Complete the missing part of the following Python program to calculate the deflection of a simply
Question : Complete the program.
Points
Complete the missing part of the following Python program to calculate the deflection of a simply supported beam under a point load. The program should prompt the user to enter the length of the beam, the width, the load applied, and the elasticity of the material. It should then use the following functions to perform the necessary calculations:
double calculateDeflection : receive length, width, load and elasticity. Calculate and return deflection,
this function should call also the momentOfInertia function the receive length and width and calculate and return momentOfinertia.
Then, the result should be displayed using the following function:
void displayResult : print the value of deflection.
Equations and Details:
Deflection of a simply supported beam under a point load:
Where the moment of Inertia is calculated:
table# Function to calculate the moment of Inertia# Function to calculate the deflection of a simply supported beam underFunction to display the results
# Function main
def main :
# Get input from the user
length float input Enter the length of the beam:
width float input Enter the width of the beam:
load floatinput Enter the load applied:
elasticity floatinputEnter the elasticity of the material:
# Calculate deflection
# Display the result
Sample result:
Enter the length of the beam:
Enter the width of the beam:
Enter the load applied:
Enter the elasticity of the material:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started