0% found this document useful (0 votes)
23 views39 pages

Motion Blocks

This document introduces coding and programming, explaining it as writing instructions for computers using tools like Scratch. It emphasizes problem-solving through step-by-step processes and provides examples of using Scratch to create animations and games. The document also outlines the basic interface of Scratch and the functionality of motion blocks for controlling sprite movements.

Uploaded by

Safia gulzar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views39 pages

Motion Blocks

This document introduces coding and programming, explaining it as writing instructions for computers using tools like Scratch. It emphasizes problem-solving through step-by-step processes and provides examples of using Scratch to create animations and games. The document also outlines the basic interface of Scratch and the functionality of motion blocks for controlling sprite movements.

Uploaded by

Safia gulzar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

Lesson 1

• What is coding?
• How do I make my
character move using code?
Problem solving
• Identify, define, and analyze a problem
• How to brush your teeth?
• Identify the problem: You need to brush your
teeth.
• Break it into steps: Get your toothbrush, put
toothpaste on it, brush for 2 minutes, rinse
Activity
• How to cross the road?
• “How to pack a school bag?”
What is computer
programming/coding
??
Coding/programming is…
• Writing a list of instructions that you
want the computer to follow in a
certain order.
Scratch
• One program that allows us to make
SIMPLE games/videos/stories/etc.
• Gives us the tools to make our own
programme.
EXAMPLE
• Scratch works like LEGO for programming. Just like you snap LEGO bricks
together to build something, in Scratch, you snap blocks of code together
to create animations, games, and stories.“
• Building a LEGO Tower: If you want to make a tall LEGO tower, you snap
blocks on top of each other. Similarly, in Scratch, you snap blocks of code
to make your character (called a sprite) perform actions like walking,
jumping, or talking.
Professional Code
Scratch Code

Uses blocks
instead of
complicated
numbers or
words
See what Scratch is all
about:
• https://scratch.mit.edu/about/
e
Stag
BASIC INTERFACE
B
De lock
scr
on ipti
Scr
i
Are pt
a

Sprite
List
Sprite
Start the Programme/Stop the
Programme
Scripts/Blocks of Code
Categories of Scripts/Blocks
• “How to add sprit?
• How to change background?
• Demo
X-Y coordinate
Scratch

Programming In Scratch!

• In the upper, center corner of your


Scratch window, you will see 10 buttons .
• Each of these buttons have programming
blocks in those particular areas.
• We will first experiment with the Motion
blocks.
Scratch

Motion!
• Motion blocks are the blocks that control a
sprite's movement.
• There are 17 Motion blocks in Scratch 2.0 .
• Ex:-
 Move () Steps — Moves the sprite forward
the amount of steps.

Go to X: () Y: () — Moves the sprite to the


specified X and Y position.
Scratch

Motion!

• Drag out the “move 10 steps” block.

• Change the “10” to “50” by clicking in the


block and typing in 50.
• To see your sprite move 50 pixels to the
right, double click on the block in the
Script area. Cool, isn’t it?!
Real life example
• "What happens when you want to move a toy
car? What actions do you take?
• just like moving a toy car, we give instructions
in Scratch using motion blocks to control the
sprite's position, speed, and direction.
Bouncing Ball

Question: Can your sprite bounce up by 10, wait


for 1 second, and then come back down?
• Question: Make the sprite glide to a random
position, wait 1 second, and glide again.
• Question: When I click left key, Rotate the
sprite left, wait 1 second, and then rotate it
right?

Question: Can your sprite walk in a square?


Move forward 10 steps, go up by 10, and wait
for 1 second at each corner.

You might also like