Question: density water.dat density air.dat Step 1: write code to read the density-vs-temperature of both water and air data into two lists/arrays, (hint: for each row,

density water.dat density air.dat Step 1: write code to read the density-vs-temperature of both water and air data into two lists/arrays, (hint: for each row, you need to detect if first character is #, if so skip it, otherwise parse the data and save it to lists below) Water temp=[] water density=[] Airtemp=[] air, density=[] - Step 2 Read the description below to generate a polynomial function that fit the data Step 3: plot the results of the raw data and the fit polynomial function (hint: after you create the fit function in step 2, for each temperature value in water_temp or air temp, calculate the value of density values and save to water_density fit[] and air_density_fitl, and then you can plot them together) Your output should be like these two figures Temperature dependence of air density dence of water data -itted degree 1 polynomial data -fitted dogree 1 polynomial 000- fitted degree 2 polynomial fitted dogree 2 polynomial 1.30 980 120 060 -10 20 30 Temperature density water.dat density air.dat Step 1: write code to read the density-vs-temperature of both water and air data into two lists/arrays, (hint: for each row, you need to detect if first character is #, if so skip it, otherwise parse the data and save it to lists below) Water temp=[] water density=[] Airtemp=[] air, density=[] - Step 2 Read the description below to generate a polynomial function that fit the data Step 3: plot the results of the raw data and the fit polynomial function (hint: after you create the fit function in step 2, for each temperature value in water_temp or air temp, calculate the value of density values and save to water_density fit[] and air_density_fitl, and then you can plot them together) Your output should be like these two figures Temperature dependence of air density dence of water data -itted degree 1 polynomial data -fitted dogree 1 polynomial 000- fitted degree 2 polynomial fitted dogree 2 polynomial 1.30 980 120 060 -10 20 30 Temperature
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
