Implement the Pythagorean Theorem