Question: Please Show All the Code and Output. This is one question with 4 sub questions 1. Consider a gas in a piston-cylinder device in which

Please Show All the Code and Output. This is one question with 4 sub questions
1. Consider a gas in a piston-cylinder device in which the temperature is held constant at 300K. As the volume of the device was changed, the pressure was measured. The volume and pressure values are reported in the following table: Volume (L) Pressure (kPa) 10 2490 20 1250 30 820 40 620 50 510 60 410 Assuming that the data should follow the Ideal Gas Model PV = nRT Algebraically transform the model into a linear form y = mx + b. Write a program/script that will perform linear regression on the appropriate form of the data in order to obtain the linear parameters m and b, and then use these parameters to determine the number of moles of gas n in the sample (note: R = 8.314 L kPa K-? mol-?). . Also use the subplot command to create a figure window with two plotsone with P on the vertical axis versus V on the horizontal axis, and the other plotted in the linearized form. In both graphs, the measured data should be plotted with markers, while the model should be plotted as a smooth curve or line. Use your results as evidence to explain whether or not the Ideal Gas Model provides a good description of the measured data
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
