Introduction to Scratch: Let’s Play!
1
Description 1
Learning Objectives 1
Recommended ages or grade level 1
Recommended duration 1
Materials 1
Curricular Connections 1
Sustainable Development Goals (SDGs) 1
Prior to the workshop, it is recommended that: 1
Optional Classroom Warm-up (10-15 min.) 2
Introduction to Scratch & Coding Warm-up (5-10 min.) 2
Build your game (30-40 min.) 3
Add an opponent and score (10-15 min.) 5
Wrap-up (5 min.) 12
Reflection (5 min.) 13
This work is licensed under a
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
v. 1.1 - Last updated 02.08.21
©Kids Code Jeunesse 2021
Introduction to Scratch: Let’s Play!
Description
An introductory workshop designed to guide students through their first exposure to
block-based programming and Scratch. Students will begin their coding journey in
an interactive, game-based manner with a focus on fun and exploration!
Learning Objectives
● Familiarity with Scratch and block-based coding
● Familiarity with basic programming concepts of sequencing and loops
● Learn the programming concept of variables
Recommended ages or grade level
Ages 9-12 OR grades 3-7
Recommended duration
60 - 120 minutes
Materials
● At least one computer for two participants
● Internet access
● Scratch account (optional)
● Final Scratch project (basic)
● Project with Extensions A, B, C & D
Note: if a participant does not have an account, a USB key can be used to save the
project.
Curricular Connections
● Mathematics:
○ Multiplication and ratio
○ Angles
Sustainable Development Goals (SDGs)
● SDG #3 - Good Health & Well-being
● SDG #4 - Quality Education
Prior to the workshop, it is recommended that:
● Explore the Scratch for Educators webpage
● Create a Scratch Teacher Account (optional)
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-1 -
Optional Classroom Warm-up (10-15 min.)
Computational Thinking in Action!*
*suitable for in-person workshops
● Ask for three student volunteers.
● Volunteer (A) sits at desk with back to simple image drawn on 5 x 5 grid on
whiteboard, blackboard, or projected on a powerpoint slide. This could be a
duck, or a heart, or whatever the educator decides.
● Volunteer (B) gives simple directions to volunteer (A) to recreate image.
● Volunteer (C) writes down the directions that volunteer (B) gives.
● Once the challenge has been accomplished, volunteer (C) reads out the
directions. Class reflects on how the directions could be simplified using
sequences and repetition.
Introduction to Scratch & Coding Warm-up (5-10 min.)
Facilitate a quick intro to Scratch by going over the different sections of the screen
and explaining the “3 S’s”:
1. Stage: where the action happens
2. Sprites: the characters that are part of the program
3. Script: where the code is written
Follow up the Scratch intro by giving students a brief demonstration of moving
sprites in Scratch, using motion blocks and loops.
● Give students the option to code along with you, or just watch.
● This code can be deleted once the demonstration is complete.
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-2 -
Build your game (30-40 min.)
Use a loop and a variable to create a game called “Ball chase”.
Screen capture of the finished game
Note: Have students choose one sprite to be the “player” and another for the
“ball”, as well as a background, and rename sprites to “Player” and “Ball” for
consistency.
Game objective: Touch the ball to score points
1. Use a forever loop for the first player sprite. In this game, the mouse-pointer
will be used to control this sprite.
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-3 -
2. Build a reset sequence with the following blocks:
3. Create a variable named Player Score and add Set Player Score to 0 in the
reset sequence.
4. Create a third sequence for the “Ball” sprite. Once the ball is touched, it will:
a. Trigger a sound
b. Move to a random position
c. The player will score 1 point
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-4 -
The Green Flag will be used to trigger the movement, add a point to the score and
trigger the sound while the space key will make the ball go to its starting point.
Code for interactions on the left, reset / starting sequence on the right.
Add an opponent and score (10-15 min.)
The participants will add another sprite to be the opponent. In this game, the new
sprite will be run automatically as a computer opponent.
Steps to code the opponent:
1. The Green Flag will be used to trigger the movement, add a point to the score
and trigger a different sound while the space key will make it go to its starting
point (reset sequence).
2. Create a second variable called “Opponent Score” and set to 0 on the reset
script.
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-5 -
3. In the “ball” sprite, add a second condition loop (if/then) so that the opponent
can also get points if it touches it. Another sound can also be added in this
case.
Extension A: Add Win / Lose Conditions (10-15 min)
The participants will add a winning/losing condition if the participants or their
opponent get to a certain score first.
1. Create two new backdrops. The first one will say “You win” and the other “You
Lose”.
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-6 -
2. Add another condition in the ball’s loop.
3. Set the condition to be if “Player Score” = 10 then switch background to “You
Win”
4. Create another one to do the same for “You Lose” if ‘Opponent Score’=10.
5. Add a switch backdrop to Basketball 1 block to the when space key pressed
reset code on the Ball sprite to ensure the game begins with the correct
backdrop.
Extension B: Add a timer (5-10 min)
The participants will code a timer that will end the game once the pre-set time
expires.
1. Create a variable called “Timer” using the Make a Variable button in the
Variables menu.
2. Code a timer using wait, repeat and set / change variable blocks to count
down the desired length of the game.
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-7 -
3. If desired, add a stop all block from the Control menu to end the game once
the time limit is reached.
Extension C: Add in Advanced Movement (10-15 min)
The participants will code their player sprite to move with arrows (using key space
pressed sensors) instead of the mouse pointer.
1. Build a script with nested forever and if then loops
2. Add the key space pressed sensor block and change the input to read key up
arrow pressed
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-8 -
3. Add motion to your code with the change y by 10 block to have the sprite
move up the stage.
a. Optional: add the point in direction 90 block inside the nested loops to
change the visual direction of the sprite to match the direction its
moving. Make sure to adjust the direction to match the movement.
The block change y refers to the movement while the point in direction block refers to
direction.
4. Repeat step three for the other three directional keys (down, left, and right),
and make sure to disconnect the original movement code using point
towards mouse pointer from the when green flag clicked block.
a. Make sure to adjust the integer value of the Motion blocks to reflect the
correct Cartesian value (and if desired, visual direction)
i. up = y by 10
ii. down = y by -10
iii. right = x by 10
iv. left = x by -10
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-9 -
The blocks change x and y refer to the movement while the point in direction blocks refer to direction.
Extension D: Add a Second Player (10-15 min)
The participants will modify the opponent sprite, adding in advanced movement with
W, A, S, and D keys so the opponent can be controlled by another human player
instead of the computer.
1. Build a script with nested forever and if then loops
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-10 -
2. Add the key space pressed sensor block and change the input to read key w
pressed
3. Add motion to your code with the change y by 10 block to have the sprite
move up the stage.
a. Optional: add the point in direction 90 block inside the nested loops to
change the visual direction of the sprite to match the direction its
moving. Make sure to adjust the direction to match the movement.
The block change y refers to the movement while the point in direction block refers to
direction.
4. Repeat step three for the other three directional keys (down, left, and right), and
make sure to disconnect the forever loop controlling movement from the when
green flag clicked block.
b. Make sure to adjust the integer value of the Motion blocks to reflect the
correct Cartesian value (and if desired, visual direction)
i. W = y by 10
ii. S = y by -10
iii. D = x by 10
iv. A = x by -10
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-11 -
The blocks change x and y refer to the movement while the point in direction blocks refer to direction.
Wrap-up (5 min.)
● Objective recap
○ Review the coding concepts of sequence, loop and variable
○ Discuss where each concept was used in the project
● Presentation of projects: are there volunteers?
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-12 -
Reflection (5 min.)
Have learners Think-Pair-Share the following questions:
What is:
● 1 new new thing that you learned today
● 1 area that challenged you in this workshop
● 1 way you can use something from this workshop in your own life
v. 1.1 - Last updated 04.08.2021
©Kids Code Jeunesse 2021
-13 -