Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Antoine's Equation describes the relationship between vapor pressure and temperature for a pure substance. The equation is: l o g 1 0 ( P )

Antoine's Equation describes the relationship between vapor pressure and temperature for a pure
substance. The equation is:
log10(P)=A-B(C+T)
P= vapor pressure (mmHg)
T= temperature (C)
A,B,C are constants that depend
A,B,C are constants that depend on the substance
Download the file, Task1.txt, from the Canvas Site. The first row of the text file has column
headers. There are seven columns: Substance, A, B, C, Tmin (C),Tmax(C), and T(C).
Develop a Python script, HW-W3D2_Task1_UCusername, to do the following:
Read the data from the text file, Task1.txt
Save the Substance data and the Temperature (T) data, in their own lists
Create an empty list for pressure
For each row of data, if the temperature (T) is within the range ( TminTTmax ),
calculate the vapor pressure P(in units of mmHg) and add it to the pressure list you
created.
If the temperature, T, is out of range, add the value -9999 to the pressure list - indicating
that the temperature is unacceptable (values that are outside the range of possibility, often
that contain all 9's, are used to indicate an error has occurred).
Open a new text file, Task1_Results.txt for writing, and write three columns of data:
Substance, Temperature, and Pressure, to the file. The first row should contain the
column headers. The pressure values should be precise to two places behind the decimal
point.
Expected Output (Partial):
(Second photo is the file task1_results.txt for writing
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

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions