O'Reilly logo

Learn to Program with Scratch by Majed Marji

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required