Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( ' rod length in m : ' ) ) ( ' force in Newtons: ' ) ) ( are the units correct? ) #

('rod length in m: '))
('force in Newtons: '))
(are the units correct?)
# elastic modulus of steel
# the circular constant (this line is correct)
# convert units
# cross-sectional area
# The stretch, in meters
*1000.0 # now in milimeters
ts
vill stretch %6.03fmm.% delta_mm)]
Run your program as often as you'd like, before submittir
input values in the first box, then click Run program and
second box.2.20 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:
=lFAE
The equation above is correct for all of the quantities in base Sl units. So, length / in m, cross-sectional area A in m2, force F in N, and elastic
modulus E in Pa. The cross-sectional area for a circular rod of diameter d is A=d24. We will consider steel, for which E=200109Pa.
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 d=25mm,l=1m, and F=1000N is about =0.010mm. You could do the same calculations for different d,l, and F to
test the code.
Ex: If the input is:
25
1
1000
then the correct last line of output would be:
The rod will stretch 0.010mm.2.20 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:
=lFAE
The equation above is correct for all of the quantities in base SI units. So, length / in m, cross-sectional area A in m2, force F in N, and elastic
modulus E in Pa. The cross-sectional area for a circular rod of diameter d is A=d24. We will consider steel, for which E=20010Pa.
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 d=25mm,l=1m, and F=1000N is about =0.010mm. You could do the same calculations for different d,l, and F to
test the code.
Ex: If the input is:
25
1
1000
then the correct last line of output would be:
The rod will stretch 0.010mm.
main.py
d= float(input('rod dianeter in nn: ')) di we will need to convert this to n
1= float (input('rod length in m : "))
F= float (input('force in Newtons: "))
Q save constants (are the units correct?)
E=200**10****,i elastic modulus of steel
fron math import pi A the circular constant (this line is correct)
d-n=d1000.0, in convert units
A-=p**d-m???24.0, U cross-sectional area
delta =1**FA**E," The stretch, in weters
delta_mm = delta*1000.0 in now in wilineters
a show the results
print("The rod will stretch 26.03f nm."x de1ta_nn)
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)
25
1000
Input (from above) longrightarrow Output (shown below)
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

More Books

Students also viewed these Databases questions

Question

Language in Context?

Answered: 1 week ago