Question: create a python program which asks the user to enter the pH level of a recently tested liquid. The program should categorize the pH reading

create a python program which asks the user to enter the pH level of a recently tested liquid. The program should categorize the pH reading and output one of the 5 descriptions: 0-2 strong acid, 3-6 weak acid, 7 neutral, 8-11 weak base, 12-14 strong base. Create a function/module called pH(n) which returns to the calling program one of the string descriptions listed above. The prarmeter "n" is an integer value from 0 to 14 inclusive. Perform no input or output modules, only perform calculations and return results to the main routie. Create a main program which asks the user for a pH reading (For example 7). If the user provides an integer pH reading that is out of range then issue an error message and either exit the program or ask the user to input again.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!