You will finish a small calculator for the pH of a solution of a weak base. It uses the pKb, the concentration and the quadratic equation for the hydroxide ion concentration.
The idea. For a base of concentration with the constant , the hydroxide ion concentration is the positive root of . Then pOH is and pH is 14 minus pOH.
Your tasks.
kb(pkb) so that it returns from the pKb.hydroxide(pkb, c) so that it returns from the quadratic formula.ph(pkb, c) so that it returns the pH.strongest to the name of the base with the smallest pKb.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…