Chapter 6. Making Decisions

This chapter will teach you the Scratch tools you need to write programs that can compare values, evaluate logical expressions, and make decisions based on the results. We’ll also go through several useful example applications. Here’s what you’ll learn along the way:

  • Basic problem-solving techniques

  • How to use the if and if/else blocks to choose among alternative actions

  • How to construct logical expressions to evaluate given conditions

  • The flow of control in branching statements

The programs we have written so far follow a simple execution model. They start with the first instruction, execute it, move on to the next instruction, and so on until they reach the end of the program. The command blocks of these programs are executed ...

Get Learn to Program with Scratch 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.