Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Engineering LibreTexts

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.


This page titled 6: Conditionals is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Allen B. Downey (Green Tea Press) via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?