Module 4 · Answers

Answers & explanations

Section A — Easy

01
(a) A character or object on the stage. (b) The background image of the stage. (c) An alternative appearance for a sprite.
02
Motion (blue).
03
"When green flag clicked".
04
Any two: score, lives, level, time remaining, player name, current speed.

Section B — Medium

05
When green flag clicked → forever (or repeat) → move 10 steps → next costume → wait 0.1 seconds. The next costume + small wait gives the walking-animation effect.
06
when [right arrow] key pressed
   change x by 10
07
When the player loses, broadcast a message ("game over"). The "Game over" sprite has a script: when I receive [game over] → show. At the start of the game it hides itself.
08
If you don't reset it, the score from the previous game would still be there when you start a new game. "Set to 0" guarantees a fresh start every time.

Section C — Hard

09
Sprites: basket (player), apple (falling). Variables: score, lives.
Apple script: when green flag clicked → forever → go to random x at top → glide down → if touching basket then change score by 1; otherwise change lives by −1; if lives = 0, broadcast "game over".
Basket script: when right/left arrow pressed → change x by ±10.
Game over sprite: hide at start; when I receive "game over" → show, stop all.
10
when green flag clicked
set [time_left] to 30
repeat until <time_left = 0>
   wait 1 seconds
   change [time_left] by -1
say "Time's up!"
stop all
11
Cause: the script doesn't include an "if on edge, bounce" block, so the sprite keeps going past the edge. Fix: in the cat's forever loop, add the "if on edge, bounce" block after the move.
← Back Practice Next → All modules