Page 110 - 2502_Pakistan-kifayat_C-6
P. 110
21 st
Double Tap Century #Information Literacy
#Social Interaction
Skills
Tick ( ) the correct option.
1. Which programming concept allows you to make decisions and choose different actions based on
specific conditions?
a. Loops b. Conditional Blocks
2. are used to store information that can change while your program runs.
a. Variables b. Sensing blocks
Creating a Program
This program lets you control a sprite (character) using the arrow keys on your keyboard. You can move
the sprite up, down, left, or right. When the sprite touches a star, your score increases. If your score
reaches 10, you win the game!
Instructions to create the Script in Scratch:
1. Choose a Sprite: Use any sprite you like, for example, a cat or a player character.
2. Add Another Sprite: Add a second sprite, like a star. This will be the target the player needs to
touch.
3. Create a Variable: Go to the Variables category and click “Make a Variable”. Name it score, and
click OK. This variable will keep track of points.
4. Position the Star: Place the star sprite somewhere on the stage where the player can reach it easily.
5. Add the Script to Your Main Sprite: Create the script shown below for your main sprite and start
playing.
108 Premium Edition-VI

