6.11: Chapter Review
- Page ID
In this chapter, we encountered relational operators and
if statements, and we used them to develop a program that searches for Pythagorean triples. We wrote a logical function, which is a function that returns a logical value (
1 for “true” or
0 for “false”).
We also saw an example of incremental development, or developing programs gradually, adding just a few lines of code at a time and testing as you go. If you develop programs this way, you will have fewer bugs and you will find them more quickly.
This chapter defined two new terms: encapsulation is the process of wrapping part of a program in a function in order to limit interactions (including name collisions) between the function and the rest of the program; abstraction is the process of ignoring the details of how a function works in order to focus on a simpler model of what the function does.
The next chapter introduces a new tool, called
fzero, that we’ll use to solve nonlinear equations.