8 EFFECTIVE BUILDING BLOCKS

OBJECTIVES

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.

LOGIC

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.

Recap

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’. ...

Get Computational Thinking 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.