Tle7 - 8-Ict-Programming For Robotics W8
Tle7 - 8-Ict-Programming For Robotics W8
Technology and
Livelihood
Education (TLE)
ICT- Programming for
Robotics
Week 8
i
Technology and Livelihood Education Grade 8
Self-Learning Module-Programming for Robotics
Week 8
First Edition, 2020
Republic Act 8293 section 176 states that: No copyright shall subsist in any work
of the Government of the Republic of the Philippines. However, prior approval of the
government agency or office wherein the work is created shall be necessary for
exploitation of such work for profit. Such agency of office may, among other things.
Impose as a condition the payment of royalties.
Borrowed materials (i.e., songs, stories, poems, photos, brand names, trademarks,
etc.) included in this book are owned by their respective copyright holders. Every
effort has been exerted to locate and seek permission to use these materials from
their respective copyright owners. The publisher and authors do not represent nor
claim ownership over them.
Management Team:
Schools Division Superintendent : Dr. Wilfreda D. Bongalos CESO V
Assistant Schools Div. Superintendent : Dr. Marcelita S. Dignos CESO VI
Chief Education Supervisor, CID : Dr. Oliver M. Tuburan
Education Program Supervisor, LRMDS : Mrs. Teresita A. Bandolon
Education Program Supervisor, TLE : Reynold Q. Velos
ii
Property of DepED-Division of Lapu-Lapu City | www.depedlapulapu.net.ph | (032) 340-7354
INTRODUCTORY MESSAGE
This module was designed, developed, and reviewed by educators both from public
and private institutions to assist you, the teacher or facilitator in helping the
learners meet the standards set by the K to 12 Curriculum while overcoming their
personal, social, and economic constraints in schooling.
This learning resource hopes to engage the learners in guided and independent
learning activities at their own pace and time. Furthermore, this also aims to help
learners acquire the needed 21st-century skills while taking into consideration
their needs and circumstances.
As a facilitator, you are expected to orient the learners on how to use this module.
You also need to keep track of the learners’ progress while allowing them to manage
their learning. Furthermore, you are expected to encourage and assist the learners
as they do the tasks included in the module.
This module was designed to provide you with fun and meaningful opportunities for
guided and independent learning at your own pace and time. You will be enabled to
process the contents of the learning resource while being an active learner.
iii
HOW TO USE THE MODULE
Welcome!
This module is about sprites and their behavior. The module will teach the learners
the basics of programming language in creating interactive games and useful apps
in fun and creative ways.
The activities are designed and chosen specifically to help the learners code with or
without a computer. Each topic is complete with examples, illustrations, and
explanations.
Make the best use of this module. Complete the previous lesson before thoroughly
engaging in this module. That way, it will be easier for you to understand the lessons.
Carefully read the information sheets in each section and check your acquired
knowledge by answering the self-check. At the end of each section, perform the task
to test your knowledge and skills. Assess your performance by using the provided
performance criteria checklist.
You can apply what you learned if you have access to the internet for just an hour.
Go to the code.org website and sign in using your Facebook account or other
accounts. If you have questions, feel free to ask your teacher/facilitator.
Happy coding!
iv
Lesson 1 – SPRITES AND IT’S BEHAVIOR
This lesson is designed with you in mind to help you learn the concept of
sprites and their behavior and how to use it to create interactive games and other
useful apps.
1. Define “sprite” as a character or object on the screen that can be moved and
changed.
2. Create a new sprite and choose its appearance.
3. Identify actions that correlate to input events.
4. Create an animated, interactive game using sequence and events.
Directions: Read carefully and encircle the letter of the correct answer.
1. A sprite is:
A. A tiny dots on the screen C.an immovable image
B. An object on the screen to manipulate D. Object that consist of varied code
2. Which among these is a sprite behavior?
A. Twist C. move
B. Bend D. Break
9. Study the sprite behavior. Which way will the satellite move towards the sky?
In this module, students will learn about the two concepts at the heart of
Sprite Lab: sprites and behaviors. Sprites are characters or objects on the screen
that students can move, change, and manipulate. Examples of these are our favorite
flappy Bird, Sloppy Bird, and many more. Behaviors are actions that sprites will
continuously do until they are stopped. Students will interact with characters using
user input and create their fish tanks or an alien dance party. Finally, they will learn
to create their customized behaviors.
What’s New
In this portion, the new lesson will be introduced to you in various ways; a
story, a song, a poem, a problem opener, an activity, or a situation.
In this lesson, you will be introduced to the basics of sprites and their
behavior to create fun games and other useful apps.
Parts:
Activity 1. What do you think will happen to the tumbleweed sprite when you run
the code?
Activity 2. Let’s make a fish tank! (Try to draw your code before seeing the
solutions below)
Instructions:
1. Change the tumbleweed into any fish.
2. Be sure to change the sprite’s costume.
3. Set the background to blue.
4. Make the fish swim left and right.
4. To keep the fish from tumbling forever, change the fish behavior from
to
Solution:
Solution:
Activity 1.
Instruction:
Make a prediction: What do you think will happen to the alien when you
click on it?
Answer. When you click on the alien, it will go up and down on the screen.
Activity 2.
Instructions:
The alien is proud of its dancing skills on Mars, but now it can only move
from side to side. Replace the alien's behavior that will make it start spinning!
Activity 3
Instructions:
Create a new sprite that looks like a pink alien while retaining the previous
alien. Make it patrol the Marsian surface when it’s clicked.
Use the following code blocks:
Solution:
Solutions:
There are a lot of things you can do with code to make fun and exciting games.
You can even make an alien dance party. Your creativity in using the code blocks is
the limit.
What will happen to the globe when the code is run? Will it spin, will it
shrink, will it move, or will it change color?
Yes, the globe will shrink since when the code is run, the sprite (globe) will
change the size by -1. Meaning it will continue to reduce its size by 1.
Activity 2
Instructions
Fly the rocket to the stars!
How will you edit the flying behavior to make the rocket fly to the stars?
Solutions:
Activity 3
Instructions
Help the rover outrun the robot!
Solutions:
Increase the number of pixels that the rover moves. Make it higher than the
robot.
Challenge
Instructions
Make the satellite move towards the galaxy!
?
?
Code blocks and images from code.org
Self-Check
Directions. Carefully read each item and encircle the correct answer.
1. Which among these codes will create two sprites in a fish tank?
3. What will make the sprite respond to a tap and move up and down the
screen?
Instruction:
Note: Using paper and pen for this task is perfectly fine. You may also log in to
code.org to experiment with different codes until you are satisfied with your fish
tank.
Rating criteria
Criteria 4 Points 3 Points 2 Points 1 Point
Code matches Exact slight big difference No similarities
the fish tank difference
Fish tank Amazing Great very good Good
design
Fish behavior Amazing Great very good Good
Post-test
Test A. Multiple Choice
Directions: Read carefully and select the letter of the correct answer. Please
use a ¼ sheet of paper. Do not write anything on this module.
1. A sprite is:
A. A tiny dots on the screen C. an immovable image
B. An object on the screen to manipulate D. Object that consist of varied
code
2. Which among these is a sprite behavior?
A. Bend C. move
B. Break D. Twist