The temperature dependence of the heat capacity Cp of many gasses can be described in terms of a cubic equation : Cp=a+bT+cT^2+dT^4
Gas a b c d
SO2 38.91 3.904x10^-2 -3.105x10^-5 8.606x10^-9
SO3 48.5 9.188x10^-2 -8.540x10^-5 32.4x10^-9
O2 29.10 1.158x10^-2 -.6076x10^-5 1.311x 10^-9
N2 29 .00 2199x10^-2 -.5723x10^-5 -2.871 x 10^-9
Write a function that does the following:
-Requires user to enter the gas name as a string and the temperature as a number.
-If a temperature below 20C or above 300C is entered, have the function display a message that reads, "Temperature entered is outside the range. Temp must be between 20 and 300 deg C.'
-If the string for the gas is intered incorrectly or a gas that isn't listed in the table is entered, have the function display the following: "No data matches the gas you entered."
-When the temperature is given within the proper temperature range, calculate Cp for the correct gas using the polyval() command discussed in class.
-If the Cp is calculated, the output should be displayed as:
-"The Heat Capacity for (gas name) is (calculated heat capacity in J/(gmole*degC)."
Gas a b c d
SO2 38.91 3.904x10^-2 -3.105x10^-5 8.606x10^-9
SO3 48.5 9.188x10^-2 -8.540x10^-5 32.4x10^-9
O2 29.10 1.158x10^-2 -.6076x10^-5 1.311x 10^-9
N2 29 .00 2199x10^-2 -.5723x10^-5 -2.871 x 10^-9
Write a function that does the following:
-Requires user to enter the gas name as a string and the temperature as a number.
-If a temperature below 20C or above 300C is entered, have the function display a message that reads, "Temperature entered is outside the range. Temp must be between 20 and 300 deg C.'
-If the string for the gas is intered incorrectly or a gas that isn't listed in the table is entered, have the function display the following: "No data matches the gas you entered."
-When the temperature is given within the proper temperature range, calculate Cp for the correct gas using the polyval() command discussed in class.
-If the Cp is calculated, the output should be displayed as:
-"The Heat Capacity for (gas name) is (calculated heat capacity in J/(gmole*degC)."