Question: ( ' 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
