Lesson 4: Your First Scratch Program
๐ฏ Lesson Objective
By the end of this lesson, students will be able to:
- Understand what a Scratch program is.
- Use an Event block to start a program.
- Add Motion and Looks blocks.
- Connect blocks to create a sequence.
- Run and test a Scratch program.
- Make a sprite move and speak.
- Modify a program and observe the result.
๐ 1. What Is a Program?
A program is a set of instructions that tells a computer what to do.
In Scratch, we create programs by connecting coding blocks.
For example:
Start
โ
Move
โ
Turn
โ
Speak
Scratch follows these instructions in order.
This is called a sequence.
๐ก Remember
Program = A set of instructions
Script = Connected Scratch blocks that perform those instructions
๐งฉ 2. Our First Program
Today we are going to create a simple program for the Cat sprite.
The Cat will:
- Start when we click the Green Flag.
- Move forward.
- Turn.
- Say something.
Our program will look like:
๐ก When Green Flag Clicked
โ
๐ต Move 50 Steps
โ
๐ต Turn 15 Degrees
โ
๐ฃ Say "Hello! I am learning Scratch!"
๐ก 3. Step 1 โ Start the Program
Go to the Events category.
Find:
when green flag clicked
Drag it into the Coding Area.
This block tells Scratch:
“Start this program when the Green Flag is clicked.”
๐ต 4. Step 2 โ Make the Sprite Move
Go to the Motion category.
Find:
move 10 steps
Drag it below the Green Flag block.
Change 10 to 50.
Your program now has:
When Green Flag Clicked
โ
Move 50 Steps
Click the Green Flag.
๐ฑ The Cat moves!
๐ 5. Step 3 โ Make the Sprite Turn
Now add another Motion block:
turn โป 15 degrees
Place it below the Move block.
Your program becomes:
When Green Flag Clicked
โ
Move 50 Steps
โ
Turn 15 Degrees
Run the program again.
Observe how the Cat moves and then turns.
๐ฃ 6. Step 4 โ Make the Sprite Speak
Now go to Looks.
Find:
say Hello! for 2 seconds
Attach it below the Turn block.
Change the message to:
“Hello! I am learning Scratch!”
Your complete program is now:
๐ก When Green Flag Clicked
โ
๐ต Move 50 Steps
โ
๐ต Turn 15 Degrees
โ
๐ฃ Say "Hello! I am learning Scratch!"
Click the Green Flag.
๐ Congratulations! You have created your first complete Scratch program.
๐ 7. How Does the Program Work?
Scratch executes the blocks from top to bottom.
Step 1
Green Flag is clicked.
Step 2
The Cat moves 50 steps.
Step 3
The Cat turns 15 degrees.
Step 4
The Cat says the message.
This is called Sequential Execution.
Event
โ
Action 1
โ
Action 2
โ
Action 3
๐งช 8. Experiment With Your Program
Now change different values and observe what happens.
Experiment 1
Change:
Move 50 steps
to:
Move 100 steps
What changes?
Experiment 2
Change:
Turn 15 degrees
to:
Turn 90 degrees
Run the program.
What happens?
Experiment 3
Change the message to:
“Welcome to my Scratch project!”
Run the program again.
Experiment 4
Change the speech duration from:
2 seconds โ 4 seconds
Observe the difference.
๐ฏ 9. Student Practice
Create your own program.
Your sprite should:
- Start with the Green Flag.
- Move 50 steps.
- Turn 90 degrees.
- Say “Welcome to my project!”
- Move another 50 steps.
- Say “I love coding!”
Your script:
Green Flag
โ
Move 50
โ
Turn 90ยฐ
โ
Say "Welcome to my project!"
โ
Move 50
โ
Say "I love coding!"
โญ 10. Challenge Activity
Can you make your sprite create a square-like movement?
Try:
Move 100 steps
Turn 90ยฐ
Move 100 steps
Turn 90ยฐ
Move 100 steps
Turn 90ยฐ
Move 100 steps
Run the program.
๐ฏ Observe the path created by your sprite.
Challenge Question
What happens if you change 90ยฐ to 45ยฐ?
Experiment and find out!
๐ฑ 11. Create Your Own Character Program
Now choose a different sprite.
For example:
๐ Rocket
๐ถ Dog
๐ฆ Butterfly
๐พ Alien
Create a program where your sprite:
Starts โ Moves โ Turns โ Speaks
Choose your own message.
Example:
“Hi! My name is Rocket.”
๐ง Quick Revision
| Concept | Meaning |
|---|---|
| Program | Set of instructions |
| Script | Connected Scratch blocks |
| Event | Starts an action |
| Motion | Controls movement |
| Looks | Controls appearance and speech |
| Sequence | Instructions performed in order |
| Green Flag | Starts the program |
๐ Lesson Challenge
My First Scratch Program
Create a project in which your sprite:
โ
Starts with Green Flag
โ
Moves at least twice
โ
Turns at least once
โ
Says at least two messages
โ
Uses Motion blocks
โ
Uses Looks blocks
โ
Runs successfully from beginning to end
๐ Practice File
Project Name: My_First_Scratch_Program
Students should save their project after completing the challenge.
โ Learning Outcome
After completing this lesson, students understand the basic Scratch programming cycle:
Event โ Instructions โ Sequence โ Output
They are now ready to learn how Scratch responds to different Events and how we can make projects interactive.
ย