Solution to exercise: calculate a ** 2 + b ** 2 + 2 * a * b