• Show how to apply logic in programming languages.
• Demonstrate good practices when using loops and conditionals.
• Discuss the important programming styles available.
• Explain how best to handle state and its effects in your programs.
• Demonstrate advanced constructs that help to make programs easier to manage.
Chapter 2 introduced the basic ideas of logical thinking. This section shows how to incorporate some of those ideas directly in a programming language using Python as a demonstration.
Proper use of logical operators is discussed in Chapter 2, section called ‘Logical Thinking’. Some common mistakes using logical operators are discussed in the same chapter in a section called ‘Gotchas’. ...