Objective Type Questions
Question 1
Which of the following types, does repeat block belong to?
- Conditional
- Iteration
- Data
- Operator
Answer
Iteration
Reason — Repeat block belongs to iteration category.
Question 2
Which of the following types, does if...else block belong to?
- Conditional
- Iteration
- Data
- Operator
Answer
Conditional
Reason — if...else block belongs to conditional category.
Question 3
Which of the following command blocks enables you to control a sprite?
- Point in direction
- Wait_secs
- When_key is pressed
- Pen down
Answer
When_key is pressed
Reason — 'When_key is pressed' block enables us to control a sprite.
Question 4
Which of the following are conditional blocks?
- Repeat
- if
- Forever
- if-else
Answer
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.
Question 5
A Scratch script/program begins with
- An ask block
- A Say block
- An event block
- A control block
Answer
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".
Theoretical Questions
Question 1
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.
Answer
(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.
Question 2
What limits define the X, Y coordinate system of Scratch ?
Answer
The value of X coordinate ranges from -240 to 240 and the value of Y coordinate ranges from -180 to 180.
Question 3
Which block will you use to place a sprite at a specific XY position on screen ?
Answer
The go to x:__ y:__ block is used to place a sprite at a specific XY position on screen.
Question 4
What are events in Scratch ? How are these useful ?
Answer
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.
Question 5
Which block(s) will you use to play sounds in a script ?
Answer
We will use the following blocks to play sounds in a script :
- play sound ___
- play sound ___ until done
- play drum ___ for ___ beats
- play note ___ for ___ beats
Question 6
Which predefined variables of sound can you use to control the loudness and play-speed of sound, respectively ?
Answer
We can use the volume and tempo to control the loudness and play-speed of sound, respectively.
Question 7
What all can you do through Data category of blocks ?
Answer
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.
Question 8
What is the difference between repeat and repeat until blocks ?
Answer
Repeat block iterates a specified number of times whereas repeat until block repeats as long as the given condition is false.
Question 9
What is the difference between repeat and forever blocks ?
Answer
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.
Question 10
What is the difference between if and if-else blocks ?
Answer
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.
Question 11
What is the difference between say and ask blocks ?
Answer
The differences between say and ask blocks are:
- Say block is used to represent speech by sprites whereas ask block is used to prompt something to user asking for a value or response.
- Say block displays a specific speech block in the speech bubble which appears on the screen for a specified amount of time whereas ask block provides a place for the message to be displayed and waits for the response.
- Say block doesn't prompt the user for any response whereas ask block provides an input box where the user can type his response.
- Say block is available under looks category whereas ask block is available under sensing category.
Question 12
To send a message to all the sprites in the program, which block will you use ?
Answer
We will use broadcast <message>
block from Events category to send a message to all the sprites in the program.
Question 13
To respond to a received message, which block can be used by a sprite ?
Answer
We will use When I receive <message>
block from Events category to respond to a received message.
Question 14
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)
Answer
The changed blocks for playing the Meow sound for exactly five times are given below:
(a)
(b)
(c)
Question 15
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
Answer
(i) The Ask block under Sensing category
(ii) Make a variable block under Data category
Application Oriented Questions
Question 1
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.
Answer
(a) The concepts/features of Scratch used in this game are as follows:
- Sprites — The moving images of multiple things/sprites are used to represent the different items.
- Costumes — Each sprite likely has multiple costumes to show different visual representations.
- Click events — The player interacts with the game by clicking on the correct sprite.
- Sounds — The game plays a clap sound when the correct sprite is clicked.
- Keyboard events — The game detects when the space bar is pressed to move to the next item.
- Conditional blocks — There are conditional checks to determine if the correct sprite is clicked, triggering the response with the ball sprite and clap sound.
- Iteration blocks — Iteration blocks are used to make the game run continuously.
- Passing messages between sprites — The game uses the broadcast block to send message to ball sprite telling that correct sprite has been clicked.
(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.
Lab Exercise
Question 1(a)
Write Scratch programs to draw these shapes :
Answer
Question 1(b)
Write Scratch programs to draw these shapes :
Answer
Question 2
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
- for every unsuccessful guess, display message "Try again" with a drum sound play.
- After 5 unsuccessful guesses, display, "Sorry buddy, you lose. My number was <Host Number>", with a drum sound.
Answer
Question 3
Write a Scratch program to draw this
Answer
Question 4
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.
Answer