Microsoft word - hw9docxin chemistry the ph of an aqueous


Microsoft Word - HW#9.docx

In chemistry, the pH of an aqueous solution is a measure of its acidity. A solution with a pH of 7 is said to be neutral, a solution with a pH greater than 7 is basic, and a solution with a pH less than 7 is acidic.

A structure is created to store the PH value of a solution. This structure has two fields: one is called 'SolutionName', and the other is 'PH'. An example of such a variable is created as: sol1 = struct('SolutionName', 'water', 'PH', 7);

Write a function that will take in one such a variable as the input argument, determine its acidity based on the pH value, add another field 'acidity' with the determined value (neutral, basic, or acidic ) to this structure, and return this new structure as the output.

For example, if the above sol1 is used as the input, the output variable would be:

OutputVar =
    SolutionName: 'water'
              PH: 7
         Acidity: 'neutral'

 

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Microsoft word - hw9docxin chemistry the ph of an aqueous
Reference No:- TGS01146052

Expected delivery within 24 Hours