Chapter 10 Conditionals
This chapter starts a new part: Basics of programming.
Overview of chapters in this part:
- Chapter 10 introduces conditionals (for distinguishing between cases)
- Chapter 11 introduces functions (for creating our own functions)
- Chapter 12 introduces iteration (for executing code repeatedly).
Conditional statements allow distinguishing between cases and perform corresponding computations. In both spoken and computer languages, such constructs are typically signalled by “if-then.”
Recommended background readings for this chapter include:
To reflect upon the notion and uses of conditionals, try answering the following questions:
What is the function of if-then statements?
What feature could serve the same function? (Hint: Think base R…)