Wednesday, February 17, 2016

Computer 6. Moving Ahead with Scratch 1.4

Note :- 
1.  Computer Syllabus of Cycle Test 4 - Chap 5(Errors and Format Specifiers)6 and 7
2. Material for chapter 7 will be uploaded soon.
 3.For better exam preparation, students are advised to refer this material along with text book.
Chapter 6
Moving Ahead with Scratch 1.4
Que 1.  How to move sprite randomly covering  whole stage?
Ans :-    Scratch stage ranges from -240 to 240 horizontally and -180 to 180 vertically. To randomly glide sprite across the entire stage we can use following code.

Que 2.  What is the use of Sensing block –key pressed?
Ans : -  Many times we want a program to respond to a key pressed on the keyboard. For example, if we want to use the keys ‘b’ to make the sprite bigger and ‘s’ to make the sprite smaller by 10% each time they are pressed respectively, the given code block will be used.


Que 3.  How will you prevent the sprite from going into the boundary of the stage while moving it on stage?
Ans : - With the help of ‘ if on edge bounce’ from the motion block we can prevent  the sprite from going into the boundary of the stage while moving it on stage.


Que 4. What is the use of generating random numbers in Scratch?
Ans  :-  Random numbers in sprite can be used in games to move a sprite to an unpredictable position on the stage each and every time which adds a surprise element and makes the game more interesting and challenging for the player.

Que 5.  Explain with an example the application of sensing keys in scratch.
Ans : -  Many times we want a program to respond to a key pressed on the keyboard. For ex. This script will make the sprite say “Hello” for 2 seconds whenever you press the Spacebar key.


Que 6.  Create a simple game using scratch.
Ans : -








Que 7  What will be the output of the following script block.

  - 

a)    


Sprite will move 10 steps or sprite will move 50 steps.

b)     

- Sprite will change the colour randomly.

c)   

   - Sprite will say hello for 1 second when spacebar key is pressed.

d)    

 - Sprite will move along with mouse pointer and when mouse is clicked, sprite will move to center of the stage.






No comments:

Post a Comment