Computer Applications
Answer
Eight times.
Explanation
Code | No. of times sprite moves 10 steps | Remarks |
---|---|---|
move 10 steps | 1 time | The sprite moves 10 steps once. |
repeat 3 move 10 steps move 10 steps | 6 times | The sprite moves 10 steps two times inside the repeat block. The repeat block executes 3 times. 2 * 3 = 6 times Thus, the sprite moves 6 times inside the repeat block |
move 10 steps | 1 time | The sprite moves 10 steps once. |
Thus, the total number of times the sprite moves is 8 (1 + 6 + 1).
Related Questions
State true or false.
(a) Control category contains blocks that start or stop a script.
(b) You can even load own sprite from a file.
(c) You can grow a sprite but cannot shrink it.
(d) Pen down command stops the drawing on the stage.
(e) Backdrops are the backgrounds for the stage.
Look at the section of code below that controls a sprite.
Write down what you think the user will see when the green flag is clicked.
What is the job of the 'forever' script ?
What instructions would I use if I wanted a loop to execute 10 times ?