This lesson introduces students to Scratch, a visual programming language. It discusses the different block palettes in Scratch for motion, looks, sound, events, control, sensing, operators, and variables. These palettes contain blocks that allow users to program interactive projects. The lesson instructs students how to set up their Scratch workspace, delete the default sprite, add a new sprite, and use blocks from the events palette to make the sprite move left and right or up and down when buttons are pressed. It emphasizes the x and y axes for movement. The lesson concludes with a class discussion about what students learned.
2. Lesson Objective: Students will be
introduced to Scratch, a visual
programming language, and learn the
basics of creating simple interactive
projects.
3. Scratch Programming:
What is it?
Scratch is a visual programming language that
allows users to create interactive projects by
dragging and snapping code blocks together.
It provides a user-friendly interface with a variety
of built-in sprites, sounds, and backgrounds that
students can use to bring their ideas to life.
Scratch encourages creativity, problem-solving,
and collaboration, making it an ideal platform for
beginners to learn the basics of programming.
1
2
3
4. Block
Palette
In Scratch
Programming there
are all of these block
palettes on the left
side of the screen.
Each section will
contain blocks and
codes that do
different things. We
are going to dive
more into these to
really understand
what each ones do
before we begin
programming on our
own.
Motion: Motion blocks in Scratch are like instructions that tell a sprite (a
character) how to move, spin, or go to a specific place on the screen.
Looks: Looks blocks in Scratch help you change how your sprite looks by
adding costumes, making it bigger or smaller, or even hiding and showing it.
Sound: Sound blocks in Scratch allow you to add cool sounds to your
projects, like music or effects, making them more fun and interactive.
Events: Event blocks in Scratch help you decide when your code should start
running, like when you press a key, click on something, or when the game
starts.
Control: Control blocks in Scratch help you control the order and repetition of
your code, like making things happen over and over again, or telling your code
to wait for a certain amount of time before doing something.
Sensing: Sensing blocks in Scratch allow your code to sense or gather
information from the environment, like detecting if a sprite is touching
another sprite or getting the current time.
Operators: Operator blocks in Scratch help you perform calculations and make
comparisons in your code, like adding numbers together, checking if something is equal to
another thing, or finding the remainder when you divide two numbers.
Variables: Variable blocks in Scratch let you create and store information
that can change while your program is running, like keeping score in a game
or remembering a player's name.
5. The motion block palette is a set of special tools
that help make things move on a computer screen.
It has different blocks that represent actions like
moving forward, turning, or jumping.
You can connect these blocks together to create a
sequence of movements, like solving a puzzle.
When you press a button, the computer reads the
blocks and makes the object on the screen follow
the instructions, making it move in different ways.
6. The Looks block palette in Scratch is like
a box of tools to make your characters
look cool and interesting.
It has blocks that can change the color
of your character, make them spin or
glide across the screen, and even make
them grow or shrink.
You can use these blocks to add
different costumes or images to your
character, so they can wear different
outfits or have different expressions.
With the Looks block palette, you can
make your characters come to life and
make your projects look amazing!
7. The Events block palette in Scratch helps
you control what happens in your projects.
It has blocks that can start your project
when you press a key or click the green
flag.
You can use blocks to make things happen
when different events occur, like when a
sprite is clicked or when a certain amount
of time passes.
With the Events block palette, you can
make your projects interactive and create
different actions and responses based on
what the user does.
8. The Control block palette in Scratch
helps you make decisions and control
how your program runs.
It has blocks that allow you to repeat or
loop a set of actions, so you don't have to
write the same code over and over again.
You can use blocks to make choices in
your program, like if something is true, do
one thing, and if it's false, do something
else.
With the Control block palette, you can
make your program smarter and more
efficient by controlling how it behaves
based on different conditions and
situations.
9. The Sensing block palette in Scratch helps
your program understand and respond to
different things happening in the environment.
It has blocks that allow you to detect key
events, like when a sprite is touching another
sprite or when a certain key is pressed on the
keyboard.
You can use blocks to sense and react to
motion, like when your computer is tilted or
when a sprite is moving.
With the Sensing block palette, you can make
your program more interactive by sensing and
responding to different actions and events in
the world around it.
10. The Operators block palette in Scratch
helps you perform calculations and work
with numbers in your program.
It has blocks that allow you to add,
subtract, multiply, and divide numbers.
You can use blocks to compare numbers
and check if they are equal, greater than,
or less than each other.
With the Operators block palette, you can
perform math operations and make
decisions based on numbers, making your
program more powerful and flexible.
11. The Variables block palette in Scratch
helps you store and remember
information in your program.
It has blocks that allow you to create
your own custom variables, which are
like containers that can hold different
values.
You can use blocks to set the value of
a variable, change it, or even display it
on the screen.
With the Variables block palette, you
can create and manipulate your own
data, making your program more
dynamic and adaptable to different
situations.
12. Please open your
computers and go to
scratch.mit.edu
You will need to make an account on
scratch, go ahead and make that account and give
me a thumbs up when you have done that.
13. Once you hit the
create button in the
upper left corner of
the home page, your
screen should look
like this -->
14.
15. First few steps
First you are going to want to remove the
current sprite (which is the cat) so that we
can learn how to insert your own.
You will do this by selecting the
trash can with an X in it. This should
delete the sprite.
16. In the bottom right of the screen where
your cat sprite just was should look like this
after you have selected that trash can.
Then hover over the cat with a + sign
and select the "choose a sprite"
option to search for one you would
like to use for this lesson only.
17. Next you can either search for one that you
want in the search bar, or you can scroll
through the options and select one.
Once you have selected one and clicked on it, it should pop
up on your main screen now. It should now look how mine
looks with the Ballerina on the left part of the slides.
18. In order to put a code
together you slide the
different blocks from the
side bar and put them
together like a puzzle.
19. The green flag in the upper corner is the button
people press to start the game over. You will
always want to have a starting point for your
sprite. By adding the "when green flag clicked", it
will do this action whenever someone restarts the
game. Add the go to x:0, y:0 in order to just have
your sprite start in the middle of the screen.
20. The axis going left and
right and is known as the X
axis (when moving to the
left the numbers go
negative, and when moving
right they go up positive).
The axis going up and down
is known as the Y axis
(when moving down the
numbers go negative, and
when moving up they go up
positive).
21. Moving left and right
Start with a block from the events tab that will
allow you to move your sprite when a specific
button is pressed.
Then add a block to change the X value, either
up or down depending on what was mentioned
on the graph earlier.
22. Moving up and down
Start with a block from the events tab that will
allow you to move your sprite when a specific
button is pressed.
Then add a block to change the Y value, either
up or down depending on what was mentioned
on the graph earlier.
23. Class Discussion
What did you like about our activity?
What was your favorite sprite option?
Look around at other classmates work. How can
you help each other?
What did you learn?
Note to teacher: Call students at random to answer one question.
Give them at least one minute to share their insights.
24. That's it for today!
Hope you had loads of fun learning how to
use the codes in scratch and what they all
mean and do. In the next lesson you will be
learning how to create your own
backgrounds and how to insert those into
scratch!