6: Conditionals
( \newcommand{\kernel}{\mathrm{null}\,}\)
In this chapter, we’ll use functions and a new feature—conditional statements—to search for Pythagorean triples. A Pythagorean triple is a set of integers, like 3, 4, and 5, that are the lengths of the sides of a right triangle. Mathematically, it’s a set of integers a, b, and c such that a2+b2=c2. This example will also demonstrate the incremental development process we talked about in Chapter 3.