Programming Essentials in Scratch: Unit Exam B
Instructions
- Time allowed
- 25 minutes
- Total marks
- 25
- Calculator
- No calculator is permitted.
- Answer all the questions.
Questions
Tick one box.
- LC Instructions carried out in the order they are written
Sequence means the instructions run one after another, in order.
set [lives] to 3
change [lives] by -1
change [lives] by -1
say (lives)- L1
3 - 1 - 1 = 1.
| Motion | Looks | Sound | Control | |
|---|---|---|---|---|
| move 10 steps | ||||
| say Hello for 2 seconds | ||||
| play sound meow | ||||
| repeat 10 |
Tick one box in each row.
- Lmove 10 steps: Motion
- Lsay Hello for 2 seconds: Looks
- Lplay sound meow: Sound
- Lrepeat 10: Control
Movement blocks are Motion, speech and costumes are Looks, playing sounds is Sound, and loops are Control.
Tick one box.
- LB score < 10
7 is less than 10. It is not greater than 7, not equal to 8 and not greater than 9.
repeat until <(score) = 10>
change [score] by 2
end- L3
4 becomes 6, then 8, then 10. After the third pass the condition is true and the loop stops.
set [count] to 1
repeat 3
change [count] by (count)
end| After pass | count |
|---|---|
| 1 | |
| 2 | |
| 3 |
- L2
- L4
- L8
Adding count to itself doubles it each pass: 1 becomes 2, then 4, then 8.
Tick one box.
- LD if on edge, bounce
if on edge, bounce turns the sprite round at the edge.
- LThe score changes during the game
- LA variable holds the current value and can be updated by blocks, whereas a typed number stays fixed
The score changes all through the game. A variable stores the current value and blocks can update it, whereas a number typed into a say block never changes.
Tick one box.
- LA if then else
if then else chooses between two actions.
Tick two boxes.
- LB Show the variable on the stage to watch its value change
- LD Click one script at a time and watch what it does
- LNo marks if more than 2 boxes are ticked
Running small parts and watching variables shows where the program stops doing what you expect.
repeat 5
change y by 30
end- L50
-100 + 5 x 30 = -100 + 150 = 50.
- LAn event block such as when green flag clicked starts the script
- LA forever loop so it keeps happening for the whole game
- LInside the loop, point towards the player and move a few steps (or glide to the player)
Start with when green flag clicked. Under it put a forever loop, and inside the loop put point towards Player and move 3 steps, so every pass turns the enemy to face the player and moves it a little closer.
- L60
A hexagon has six sides, so each turn is 360 / 6 = 60 degrees.
| True | False | |
|---|---|---|
| A forever loop stops on its own after a while | ||
| A Scratch variable can hold words as well as numbers | ||
| Blocks inside repeat 3 run three times |
Tick one box in each row.
- LA forever loop stops on its own after a while: False
- LA Scratch variable can hold words as well as numbers: True
- LBlocks inside repeat 3 run three times: True
A forever loop never stops by itself. Variables can hold text or numbers. A repeat 3 loop runs its blocks three times.