In today’s project, you explored the “if/then” block in Scratch and used it to build an interactivegraffiti project. “If” statements are a type of logic thathelps computers make decisions. Today, you programmed a sprite to make a decision basedon whether or not the mouse button was pressed down.
Computer scientists like you use “if” statements all the time in their code. Anyinteractive app requires conditionals. For example, in Angry Birds, if the player touchesthe screen, then the bird is positioned to launch. If the player stops touching the screen,then the bird is released!
In Fruit Ninja, if the player swipes a piece of fruit, then the fruit is destroyed.
Many apps and games also have winning conditions. A winning condition is an if/then statementused specifically to tell if someone has won the game. For example, in Candy Crush, ifa player reaches the target score, then they complete the level and win!
In the next CS First club, you will use more conditionals to make a “Shadow maker”similar to a photo editor you could find on Instagram!