Summary

This document is a Scratch tutorial session, focusing on control statements and variables. It describes conditional blocks, explaining how they work and how to use them. It also details how to use variables as placeholders for information. The session also includes project time suggestions, encouraging learners to create projects incorporating variables and control systems.

Full Transcript

Scratch Session 4 01 Control Conditional :a statement that only runs under certain conditions or situations This conditional block checks a logical test (if something is true. It only executes (runs) the code inside if the condition in the block heading (topline) is true...

Scratch Session 4 01 Control Conditional :a statement that only runs under certain conditions or situations This conditional block checks a logical test (if something is true. It only executes (runs) the code inside if the condition in the block heading (topline) is true. If not, it skips the code inside. This conditional block executes (runs) the code inside the first space if the condition in the block heading (top line) is true. If not, it executes the code in the second space (the “else” part). 02 Variables a placeholder for a piece of information that can change This is the variable itself. In this case, it is named “my variable.” When used in a If the variable is checked, its value program, this oval block will be displayed on the stage returns the current value of the variable Set variable value. Value can be any type, numerical or text. It is possible to choose any variable by means of the drop-down menu Change variable value by a specified number (for example, add one to the score variable in a game). The variable will be shown on the screen, and a checkmark appears. The variable will be hidden and the checkmark will be removed. Project time Don’t forget to add a score and let the basket move by the arrows.

Use Quizgecko on...
Browser
Browser