Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( ' rod length in m : ' ) ) ( ' force in Newtons: ' ) ) ( are the units correct? ) #
rod length in :
force in Newtons:
are the units correct?
# elastic modulus of steel
# the circular constant this line is correct
# convert units
# crosssectional area
# The stretch, in meters
# now in milimeters
ts
vill stretch deltamm
Run your program as often as you'd like, before submittir
input values in the first box, then click Run program and
second box LAB: Axial stretch a uniform rod in tension
The following equation computes the stretch in a uniform steel rod subject to a tension force using the following relation:
The equation above is correct for all of the quantities in base units. So length in crosssectional area in force in and elastic
modulus in The crosssectional area for a circular rod of diameter is We will consider steel, for which
The code below attempts to compute the stretch for a rod when the user enters the diameter, length, and force. The code has one or more
Python errors. In addition, there is an incorrect number somewhere. Using hand calculations and proper unit conversions, you find that the
correct result for and is about You could do the same calculations for different and to
test the code.
Ex: If the input is:
then the correct last line of output would be:
The rod will stretch LAB: Axial stretch a uniform rod in tension
The following equation computes the stretch in a uniform steel rod subject to a tension force using the following relation:
The equation above is correct for all of the quantities in base SI units. So length in crosssectional area in force in and elastic
modulus in The crosssectional area for a circular rod of diameter is We will consider steel, for which
The code below attempts to compute the stretch for a rod when the user enters the diameter, length, and force. The code has one or more
Python errors. In addition, there is an incorrect number somewhere. Using hand calculations and proper unit conversions, you find that the
correct result for and is about You could do the same calculations for different and to
test the code.
Ex: If the input is:
then the correct last line of output would be:
The rod will stretch
main.py
floatinputrod dianeter in nn: di we will need to convert this to
float inputrod length in :
float inputforce in Newtons:
Q save constants are the units correct?
i elastic modulus of steel
fron math import pi A the circular constant this line is correct
in convert units
U crosssectional area
delta The stretch, in weters
deltamm delta in now in wilineters
a show the results
printThe rod will stretch nm detann
Run your program as often as you'd like, before submitting for grading. Below, type any needed
input values in the first box, then click Run program and observe the program's output in the
second box.
Enter program input optional
Input above longrightarrow Output below
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