Programming concepts
With Scratch, we'll learn how to turn our imaginations into games, stories, and animations, and in the process, we'll learn some common programming concepts. If you're already a knowledgeable programmer, then you'll find out what Scratch has to offer your students.
The Scratch team publishes several resources to help educators, including a Programming Concepts guide, which I've summarized below:
Concept |
Description |
---|---|
Program Design |
When we design a program, we turn our imagination into something that can be shared with others. We create the flow of the program, the interface, and the actions each sprite takes to tell our story. |
Loops (Iteration) |
Loops iterate through a series of steps for as long as we tell the program to run the loop. We can use other programming concepts, such as conditional statements, to control the loop. |
Conditional Statements |
Check to see if a statement is true. For example, if 4 > 0 is a conditional statement. |
Boolean Logic |
Boolean logic operators include and, or, and not. If 4 > 0 and 4 > 1 is one example. |
Variables |
Variables store text or numbers for reuse in the program. They come in global and local types. For example, if x > 0 creates a conditional statement where x is 0, 1, 2, or anything else we define. |
Arrays (Lists) |
Arrays are similar to variables in that they store dynamic data. However, a list stores multiple values in the same way a grocery list stores a group of items. |
Events |
An action in the program prompts another part of the program to take an action. For example, when the Space bar is pressed, the sprite hides. |
Synchronization and Coordination |
Programming a sprite to receive a broadcast message from another sprite coordinates a cause and effect. Broadcasting a message and waiting for all the other sprites to act on the broadcast synchronizes the action. |
Threads |
Creating two scripts to run on the same control enables parallel execution. For example, programming four different sprites to pixelate when the flag (green in color) is clicked creates four threads. |
Dynamic Interaction |
Dynamic interaction provides real-time input into the Scratch program in order to manipulate the sprite in some way. For example, the position of the mouse is always known, so we can create a sprite that always follows the mouse position. |
Random Numbers |
Random numbers are picked from the range we specify. |
Programming limitations
As of Scratch version 1.4, there are a few limitations with the language. As taken from Scratch's Programming Concepts guide, here are the concepts Scratch does not cover: functions, recursion, exception handling, file input/output, inheritance, parameter and return values, and defining classes of objects.
If that last paragraph sounds like gibberish, don't worry about it.