Scratch
Scratch
What is Scratch?
Scratch is a visual programming language designed for students to learn coding. It
uses colorful blocks that are easy to drag and drop, so there's no need to write
codes. With Scratch, we can create fun projects like games, stories, and animations.
Elements of Scratch
1. Stage:
The stage is where the action happens. It’s like the screen where our game, story,
or animation takes place.
2. Sprites:
Sprites are the characters or objects you control in Scratch. We can make them
move, talk, and do all sorts of things.
3. Blocks:
Blocks are the building pieces you use to give instructions. They fit together like
puzzle pieces and tell the sprites what to do, like move, jump, or speak.
4. Scripts:
Scripts are groups of blocks that work together to create actions. A script is like a
list of instructions for the sprite to follow.
5. Backdrop:
The backdrop is the background of the stage. You can change the backdrop to make
your project look like it’s happening in different places, like a beach or a forest.
6. Costumes:
Costumes are different appearances or looks for a sprite. You can change a sprite’s
costume to make it look like it’s moving or changing expressions.
7. Sounds:
You can add sounds to your project, like music, voice, or sound effects. This makes
your projects more fun and interactive.
8. Green Flag:
The green flag is used to start your project. When you click it, your project will
begin, and all the sprites will follow the instructions.
9. Code Area:
This is where you drag and drop blocks to create the instructions for your sprites.
It’s like your workspace for making things happen.
Block Categories in Scratch
1. Motion (Blue):
These blocks make our sprite move. We can make the sprite move forward, turn,
or glide to a different place on the stage.
Example: "Move 10 steps" makes the sprite move forward.
2. Looks (Purple):
These blocks change how our sprite looks. We can make the sprite talk, change
costumes, or hide and show.
Example: "Say Hello!" makes the sprite say something on the screen.
3. Sound (Pink):
These blocks add sounds to our project. We can make your sprite play music, make
noises, or say recorded phrases.
Example: "Play sound Meow" makes the sprite play a sound.
4. Events (Yellow):
These blocks are like triggers that start your project or actions. The most common
event is "when green flag clicked" to start our project.
Example: "When green flag clicked" starts the script when the green flag is clicked.
5. Control (Orange):
These blocks control how the script runs. We can repeat actions, wait for a certain
time, or stop the code.
Example: "Repeat 10" makes the sprite repeat an action 10 times.
7. Operators (Green):
These blocks are used for math, comparing numbers, or combining text. They help
create more advanced actions.
Example: "Pick random 1 to 10" gives a random number between 1 and 10.
8. Variables (Dark Orange):
These blocks store information like scores, timers, or anything you want to keep
track of in your project.
Example: "Set score to 0" sets the score to zero at the start of the game.
9. My Blocks (Red):
We can create your own blocks with this category to reuse in your project. It’s like
making a custom block that does something specific.
Example: You can create a "Jump" block that makes the sprite jump when clicked.
Directions in Scratch
In Scratch, the stage is like a grid where sprites can move in different directions.