Answered step by step
Verified Expert Solution
Link Copied!

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 4: Complete the program.
10 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:
)3
Where the moment of Inertia is calculated:
)3
\table[[# Function to calculate the moment of Inertia],[],[# Function to calculate the deflection of a simply supported beam under],[],[Function 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 = float(input ("Enter the load applied: "))
elasticity = float(input("Enter the elasticity of the material: "))
# Calculate deflection
# Display the result
)
Sample result:
Enter the length of the beam: 100
Enter the width of the beam: 30
Enter the load applied: 55
Enter the elasticity of the material: 10500000
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

16.7 Describe the three steps in the collective bargaining process.

Answered: 1 week ago