Control flow is what separates a computer from a mere calculator. Calculators are for computing single expressions. Computers, on the other hand, have the ability to repeat the same calculations with different inputs numerous times without human intervention. Computers can choose to perform one calculation over another based on whether or not a condition holds true.
In this chapter you will explore code examples oriented around producing mathematical tables. You will learn about tables for trigonometric functions, as such tables are well known and of historical importance. Later you will explore conditional execution to help track the growth of rabbits using a method developed by Italian mathematician Fibonacci 800 years ago.
In the age of sail the use of mathematical tables became more widespread, and a need to develop ways to automate the calculation of these tables developed (navigation is based on the calculation of angles and the sides of triangles; figure 3.1). This meant calculating trigonometric functions such as sine, cosine, and tangent.