CHAPTER 3
Selections
Objectives
- To write Boolean expressions using relational operators (§3.2).
- To generate random numbers using the random.randint(a, b), random.randrange(a, b), or random.random() functions (§3.3).
- To program with Boolean expressions (AdditionQuiz) (§3.3).
- To implement selection control using one-way if statements (§3.4).
- To implement selection control using two-way if-else statements (§3.5).
- To implement selection control with nested if and multi-way if-elif-else statements (§3.6).
- To avoid common errors in if statements (§3.7).
- To program with selection statements with the ComputeAndInterpretBMI case study (§3.8).
- To program with selection statements with the ComputeTax case study (§3.9).
- To combine conditions using ...
Get Introduction to Python Programming and Data Structures, 3rd Edition by Pearson now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.