Scratch Programming
This Photo by Unknown Author is licensed under CC BY-SA-NC
LEARNING OBJECTIVES
At the end of this topic Students will be comfortable in using
 Sensing blocks
 Using Mathematical Operators
 Comparing values
 Generating random Numbers
 Changing Location Randomly
 Bouncing the Ball Up and Down
 Making a Variable
 Making Decision
 Applying Condition
INTRODUCTION
Scratch is a visual programming environment that makes it easy
to create interactive stories, games, art and animations.
For coding in Scratch you won’t need to write lines of code
because they’ll be provided in blocks.
BASIC CODE BLOCKS OF SCRATCH
Motion : These blocks control the motion of a sprite.
Looks : these blocks help user to change the
appearance of the sprite.
Sound: these blocks help add sounds to our project
and control them.
Events: These blocks help to trigger actionin in any
project.
CONTI..
Controls: These blocks help to have control over the
code such as conditions and loops.
Sensing: These blocks help our code be alive. It helps
the sprite detect things and sense them
Operators: These blocks help in all mathematical
operations such as addition, subtraction,
multiplication etc. and OR , AND .
Variables: These blocks help in the list and variable
operations.
OPERATORS IN SCRATCH
Operators Block is fun and
interesting.
This block helps in scripting
mathematical equations.
BASIC ARITHMETICAL OPERATORS
COMPARISON OPERATOR
VARIABLES
Variable is a named
data storage location
which stores a value
and this value can be
changed during the
execution of the
program.
TYPES OF VARIABLES
https://edu.google.com/
https://www.youtube.com/watch?v=jdxomoHx3co
• Numeric
• String
• Boolean
SENSING BLOCKS
Watch this video
https://www.youtube.com/watch?v=YMrM00VDw4I
GETTING INPUT FROM THE USER
https://www.youtube.com/watch?v=1PswttcxCko
 Click on Sensing set
and get the Ask and
wait command.
 Also click on the
answer check box to
make it show on the
display window.
 The answer box is the
storage in memory,
that is variable.
SENSING COMMAND AND INPUT
https://www.youtube.com/watch?v=1Pswt
tcxCko
MOVING THE SPRITE ON A
RANDOM POSITION
 When you place these
blocks in your code. It will
move the sprite on a
random position.
BOUNCING BALL GAME
 Delete the default sprite
and select the ball in
sprites.
 Add the shown blocks in
your code.
Watch the video to make another ball game:
https://www.youtube.com/watch?v=BlmBDrnhd2I
MAKING DECISIONS IN SCRATCH
 To make decisions we use if-then
and If-then-else blocks from control
sections.
 In if block we add condition and
the correct answer is added inside
the if block if the condition is true.
 For Example:
HANDS ON PRACTICE
1. Make the cat sprite fly towards your
mouse pointer.
2. Create Guess the number game. In this
game the player has to guess the
number which computer picks.
QUIZ
 https://forms.gle/BzZkZFNZyfz87vZL9

Grade-5 Topic-5 Fun with Scratch_Master.pptx

  • 1.
    Scratch Programming This Photoby Unknown Author is licensed under CC BY-SA-NC
  • 2.
    LEARNING OBJECTIVES At theend of this topic Students will be comfortable in using  Sensing blocks  Using Mathematical Operators  Comparing values  Generating random Numbers  Changing Location Randomly  Bouncing the Ball Up and Down  Making a Variable  Making Decision  Applying Condition
  • 3.
    INTRODUCTION Scratch is avisual programming environment that makes it easy to create interactive stories, games, art and animations. For coding in Scratch you won’t need to write lines of code because they’ll be provided in blocks.
  • 4.
    BASIC CODE BLOCKSOF SCRATCH Motion : These blocks control the motion of a sprite. Looks : these blocks help user to change the appearance of the sprite. Sound: these blocks help add sounds to our project and control them. Events: These blocks help to trigger actionin in any project.
  • 5.
    CONTI.. Controls: These blockshelp to have control over the code such as conditions and loops. Sensing: These blocks help our code be alive. It helps the sprite detect things and sense them Operators: These blocks help in all mathematical operations such as addition, subtraction, multiplication etc. and OR , AND . Variables: These blocks help in the list and variable operations.
  • 6.
    OPERATORS IN SCRATCH OperatorsBlock is fun and interesting. This block helps in scripting mathematical equations.
  • 7.
  • 8.
  • 9.
    VARIABLES Variable is anamed data storage location which stores a value and this value can be changed during the execution of the program.
  • 10.
  • 11.
    SENSING BLOCKS Watch thisvideo https://www.youtube.com/watch?v=YMrM00VDw4I
  • 12.
    GETTING INPUT FROMTHE USER https://www.youtube.com/watch?v=1PswttcxCko
  • 13.
     Click onSensing set and get the Ask and wait command.  Also click on the answer check box to make it show on the display window.  The answer box is the storage in memory, that is variable. SENSING COMMAND AND INPUT https://www.youtube.com/watch?v=1Pswt tcxCko
  • 14.
    MOVING THE SPRITEON A RANDOM POSITION  When you place these blocks in your code. It will move the sprite on a random position.
  • 15.
    BOUNCING BALL GAME Delete the default sprite and select the ball in sprites.  Add the shown blocks in your code. Watch the video to make another ball game: https://www.youtube.com/watch?v=BlmBDrnhd2I
  • 16.
    MAKING DECISIONS INSCRATCH  To make decisions we use if-then and If-then-else blocks from control sections.  In if block we add condition and the correct answer is added inside the if block if the condition is true.  For Example:
  • 17.
    HANDS ON PRACTICE 1.Make the cat sprite fly towards your mouse pointer. 2. Create Guess the number game. In this game the player has to guess the number which computer picks.
  • 18.