Loading...
Please wait while we prepare your content
Please wait while we prepare your content
Solutions for Computer Applications, Class 10, CBSE
Navdha is playing a game created by her teacher using Scratch. The game works like this :
An item/thing name is shown on screen and then the screen shows moving images of multiple things/sprites. The player has to click on correct image/sprite as per displayed name. If the player clicks on correct sprite/image, a ball sprite in the right corner starts jumping and clap sound also plays. If the player wants to move to next thing/item, the player can press a space bar.
(a) Identify the concepts/features of Scratch used in this game.
(b) Which concept/feature is used to move to next item if space bar is clicked ?
(c) Which concept/feature is used to tell ball sprite that correct image/sprite has been clicked.
(a) The concepts/features of Scratch used in this game are as follows:
(b) The Events feature is used to move to next item if space bar is clicked. The programmer uses the command when space key pressed
so that the game listens for the space bar key press event and uses this event to advance to the next item.
(c) The broadcast block from events category is used to tell ball sprite that correct image/sprite has been clicked.
Write Scratch programs to draw these shapes :
Write Scratch programs to draw these shapes :
Create a Guessing game where your sprite generates a number (Host Number) in the range 10 to 99 (*Use Random number generator for this).
User is then asked to 'Guess this number' (userGuess) and given 5 chances to do this (*5 times loop)
If the user's number (i.e., UserGuess) is same as HostNumber, then your program should display "You Win" and plays a drum sound. If user is not able to guess the number then
Write a Scratch program to draw this
Write an interactive program in which the sprite is crazily drawing on stage forever. But if the user presses a space bar, the pen size and pen colour change along with a sound play.
Which of the following types, does repeat block belong to?
Iteration
Reason — Repeat block belongs to iteration category.
Which of the following types, does if...else block belong to?
Conditional
Reason — if...else block belongs to conditional category.
Which of the following command blocks enables you to control a sprite?
When_key is pressed
Reason — 'When_key is pressed' block enables us to control a sprite.
Which of the following are conditional blocks?
if and if-else
Reason — if and if-else blocks perform a certain function if a particular condition is true or false. Hence, they are conditional blocks.
A Scratch script/program begins with
An event block
Reason — In Scratch, the event blocks are used to start the execution of a script when a specific event occurs. Common event blocks include, "When Green Flag Clicked", "When Key Pressed", "When Sprite Clicked".
True or False.
(a) In Scratch, the Ask block stores the user's response in "question" variable.
(b) In Scratch, movement of a sprite draws on stage only if pen is down.
(c) Multiple sprites can receive a message.
(d) A variable can be thought of as a container or placeholder in memory holding different values over time.
(e) An answer variable must be created before using Ask block.
(a) False.
Reason — In Scratch, the Ask block stores the user's response in "answer" variable.
(b) True.
Reason — When the pen is down, the sprite draws as it moves on the stage.
(c) True.
Reason — Scratch provides a broadcast block from Events category that will send the specified message to all the sprites.
(d) True.
Reason — A variable is a placeholder that can store a value as long as the script runs.
(e) False.
Reason — The Ask block stores the user's response in a default variable named 'answer'. It may not be created by the user beforehand.
What limits define the X, Y coordinate system of Scratch ?
The value of X coordinate ranges from -240 to 240 and the value of Y coordinate ranges from -180 to 180.
Which block will you use to place a sprite at a specific XY position on screen ?
The go to x:__ y:__ block is used to place a sprite at a specific XY position on screen.
What are events in Scratch ? How are these useful ?
An event refers to occurrence of some action recognized by computer. For example, when a key is pressed on the keyboard or when we click a mouse button.
Using events blocks, we can create programs defining actions to be performed in case a specific event occurs. For example, with the help of events, we can rotate our sprite by 15° when the user presses a space key.
Which block(s) will you use to play sounds in a script ?
We will use the following blocks to play sounds in a script :
Which predefined variables of sound can you use to control the loudness and play-speed of sound, respectively ?
We can use the volume and tempo to control the loudness and play-speed of sound, respectively.
What all can you do through Data category of blocks ?
Data blocks let us create and manipulate data in our animations and games. We can create two types of data: variables and lists. These can be used with sprites and with the stage.
When we specify the name of a variable, we can also specify if the variable is a local variable or a global variable. Once the variable is created, it is available through the Data block and the commands used to manipulate the variable are also available in the Data block.
What is the difference between repeat and repeat until blocks ?
Repeat block iterates a specified number of times whereas repeat until block repeats as long as the given condition is false.
What is the difference between repeat and forever blocks ?
Repeat block is a finite iteration block i.e., it iterates a specified number of times whereas forever block is an infinite iteration block i.e., it keeps repeating the commands inside it over and over again.
What is the difference between if and if-else blocks ?
The if block is used when we have to take action depending on a certain condition being true whereas the if-else block is used when we have to take different courses of action depending upon whether the condition is true or false.
What is the difference between say and ask blocks ?
The differences between say and ask blocks are:
To send a message to all the sprites in the program, which block will you use ?
We will use broadcast <message>
block from Events category to send a message to all the sprites in the program.
To respond to a received message, which block can be used by a sprite ?
We will use When I receive <message>
block from Events category to respond to a received message.
All the three blocks given below run infinitely.
Make changes in these so that these play the Meow sound for exactly five times.
(a)
(b)
(c)
The changed blocks for playing the Meow sound for exactly five times are given below:
(a)
(b)
(c)
Name the tab and category of blocks that should be selected to do the following :
(i) Ask the user's name
(ii) Add a variable to store points of the game
(i) The Ask block under Sensing category
(ii) Make a variable block under Data category