Calculate the pH of a 1 L buffer solution that contains 0.050 moles of acetic acid and 0.040 moles of sodium acetate to which 0.020 moles of NaOH has been added.