Introduction to
Scratch Programming
MODULE 1
INTRODUCTION TO SCRATCH PROGRAMMING
OBJECTIVES:
Introduction to Scratch
Uses and Features of Scratch programming language
Scratch interface
Scratch Element
Choosing a Sprite and a backdrop
Saving and Opening your Project.
INTRODUCTION TO SCRATCH PROGRAMMING
What is a programming?
Programming is an art of writing instruction to tell a computer what to do.
A set of instructions is called a PROGRAM.
What Is Scratch?
Scratch is a visual programming language that allows students to create their own games,
animations, interactive stories and other visually rich programs.
Scratch is a fun and exciting way to learn how computers work. It helps you become a creative
thinker and problem solver while having fun making games and stories.
Scratch is a programming language developed by the Lifelong Kindergarten Group at the MIT
(Massachusetts Institute of Technology) Media Lab.
WHY LEARN SCRATCH
WHY LEARN SCRATCH
Figure out how to make things work the way you want
WHY LEARN SCRATCH
The blocks fit together like puzzle pieces, so it’s easy to understand.
WHY LEARN SCRATCH
Make your own stories, games, or animations.
SCRATCH INTERFACE
Menu Start/Stop
Sprite
Tab
Block Palette
Script Area Stage
Sprite Settings
Edit Sprite
Backdrop
Extension
Library
Downloading Scratch: Go to the scratch website at http://scratch.mit.edu
SCRATCH ELEMENT
Sprite: Is a small graphic character that perform action in a scratch project. Scratch
provides a number of in-built sprite.
Stage: Is the main working area where the sprite moves and perform actions per
instruction given.
Block Palette: Block palette contains the set of blocks, which are used to program the
sprite and give actions to it.
Scripts: Is a collection of stepwise instructions that are given to a sprite to do a specific
task. Scripts is also called program.
Script area: is the place where you create a script for a sprite to do a specific task.
Backdrop library: Is the collection of images that can be used as backgrounds for the
stage in a scratch project.
CHOOSING A SPRITE AND A BACKDROP
How to choose a choose a sprite
click on the Edit Sprite at the bottom right corner of the Scratch editor.
When the library opens, click the categories at the top to view the different Sprite
available, and use the scroll bar on the right to see more designs.
Select any Sprite you like.
How to choose a choose and change a backdrop
click on the backdrop library at the bottom right corner of the Scratch editor.
When the library opens, click the categories at the top to view the different backdrops
available, and use the scroll bar on the right to see more designs.
Select any background you like.
SAVING AND OPENING YOUR PROJECT.
How to name and save a scratch project
click on the “file” icon on the top left corner of the Scratch editor.
Select the “save to your computer” option from the drop-down menu.
This will save your file to your computer.
How to load an existing project from the computer.
Click 'File', then from the dropdown menu.
click 'load from Your Computer’.
Select the correct file, then click 'Open’.
The project will then load onto the Scratch Editor
CLASS EXERCISE
Class Exercise1- Choose a Sprite with an appropriate background and save in your computer
Class Exercise2- Open the scratch application and load your saved project from your
computer .
ASSIGNMENT
1. Identify any four basic elements of Scratch Programming
2. Create a scratch project that has any two sprite of your choice with a bedroom
background.
MODULE 2
CODE BLOCKS
OBJECTIVES:
Block Palette
Types of block palette in scratch
Simple Scratch program for each blocks
CODE BLOCK
What Do You Mean By Code Blocks In Scratch Programming?
The blocks are defined as lines or blocks of code that a student can simply drag into their project in
order to create a script. We simply drag and drop a collection of code blocks and
interlock/snap them with one another to carry out a particular action in the Script section
of the Scratch.
Block palette contains the set of blocks, which are used to program the sprite and give actions to it.
MOTION BLOCK
Motion Blocks (Blue):
These blocks in Scratch are used to move or turn sprites. They are used to control the sprite’s
movement. Motion blocks enable the students to move their sprite(or character) around the stage.
For example:
EVENT BLOCK
1. Event Blocks:
These are the most important code blocks in the Scratch programming language. These blocks are
used to define when a script is to be run. That is, it is used to control the action of the sprite.
Without event blocks, the script can’t run. These blocks allow you to set up events that trigger your
program to run, such as when the green flag is clicked or when a certain key is pressed.
LOOK BLOCK
Looks Blocks:
These blocks allow you to change the appearance of a sprite, such as by changing its costume or size.
For example, Say and Think blocks are useful in adding speech or thought bubbles to the sprite in Scratch
programming language.
SOUND BLOCK
Sound Block:
These blocks allow you to play sounds or music in your program.
CONTROL BLOCK
Control Blocks:
These blocks allow you to control the flow of your program, such as by repeating a section of code or
stopping the program. Some of the widely used control blocks are as follows:
A. Repeat Block: This block is used to repeat commands for a specified
number of times. (e.g For example, you want to repeat the command
for x times).
B. If then else Block: These blocks are a type of conditional block that is
used to carry out a particular action. If the set condition is met, it will
perform the action. Otherwise, it will perform the alternative action that is
defined under the else block.
OPERATOR BLOCK
Operator Blocks:
These blocks allow you to perform mathematical operations or compare values in your program.
These code blocks are used to carry out arithmetic functions of Addition(+), Subtraction(-),
Multiplication(*) and Division(/).