Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE USE BASIC PYTHONG LANGUAGE AS THIS IS A BEGINNER CLASS THANK YOU Question 2 ( hw 2 _ q 2 . py ) :

PLEASE USE BASIC PYTHONG LANGUAGE AS THIS IS A BEGINNER CLASS THANK YOU
Question 2(hw2_q2.py): Thermal expansion is the concept of physical materials changing their shape as a result of temperature changes. For example, when we build bridges, we need to include expansion joints in the road, thereby allowing the expansion and contraction of the road due to changes in temperature. In fact, the change can be in terms of density, area, volume and shape. For this problem we will focus on the linear change to a metal based on a change in temperature.
Linear thermal expansion occurs in one axis or direction (hence the name). Here, the change in length (denoted by L) is proportional to the material's coefficient of linear expansion (), the original length of the material (L0), and the change in the temperature (T). It can be expressed with the following equation:
L=**L0**T
Similarly, volumetric thermal expansion can occur when the material expands or contracts in all directions. The change in volume (V) is is proportional to the material's coefficient of volumetric expansion (), the original volume of the material (V0), and the change in the temperature (T). It can be expressed with the following equation:
V=**V0**T
Write a Python program that prompts the user to enter each of the following:
the original length of an aluminum beam (float),
the original length of a lead beam (float),
the current temperature in fahrenheit (float), and
the ending temperature in fahrenheit (float)
Once entered, calculate the change in length and volume of both beams due to thermal expansion. Your output should include printing both the change amounts and the new values (new length, new volume)(see sample executions below). Note that the input lengths must be in terms of meters, and the input temperatures must be entered in terms of fahrenheit.
The calculations are in terms of celsius, so your program will be required to convert the user input from fahrenheit to celsius (and also to convert the amount of the temperature change). You are required to investigate the correct formula for the conversion of a temperature from fahrenheit to celsius to include in your program.
Note the following coefficients for linear and volumetric expansion for both aluminum and lead, These values are constant and should be represented in your program as constants.
3
\table[[Material,\table[[Coefficient of linear],[thermal expansion ()
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_2

Step: 3

blur-text-image_3

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

Students also viewed these Databases questions