AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Term 2 review

Week 21 · Review: Term 2 · 3 lessons
2

Stories and changes

Computing 3: Units 5–8, pp. 79–134
GoalReview logical thinking, turning algorithms into blocks, static objects and changing a story’s timing.
New words
logical thinking · working out the right steps in the right orderstatic object · a sprite with no codetiming · when things happen, and for how long
Explanation

Logical thinking breaks a job into small steps and puts them in an order that works. We write the algorithm as a table and turn each line into one block, starting with a hat block. A sprite with no code is a static object. Sprites that move, speak or change need a script. To change a story we change numbers in blocks. If two characters talk, the second one waits as long as the first one speaks. The block “switch backdrop to” changes the scene, and “when backdrop switches to” can hide or show sprites.

HedgehogwhenclickedsayDo you want to play?for3secondswait2secondssayLet’s go!for1secondsFoxwhenclickedwait3secondssayYes, please!for2seconds
Worked examples
Seconds0 to 33 to 55 to 6
Hedgehogspeakswaitsspeaks
Foxwaitsspeaks–
The Hedgehog says its first line for 3 seconds. The Fox waits 3 seconds and answers for 2 seconds. The Hedgehog waits during the answer, then says its last line. The whole talk takes 3 + 2 + 1 = 6 seconds.
whenclickedgo to x:-60y:40sayHellofor2secondsglide2secs to x:100y:40
Here is an algorithm and the blocks that match it, line by line: 1 When the green flag is clicked. 2 Go to x: −60, y: 40. 3 Say “Hello” for 2 seconds. 4 Glide for 2 seconds to x: 100, y: 40.
Stagewhenclickedswitch backdrop todayStage (2nd script)whenspacekey pressedswitch backdrop tonightBatwhenclickedhideBat (2nd script)when backdrop switches tonightshow
Here the Stage shows the day scene when the flag is clicked and the night scene when the space key is pressed. The bat is hidden at the start and appears in the night scene. A static tree has no code at all.
Class activity

Story relay (in a group of four): each child gets one job card: “write the algorithm”, “turn it into blocks”, “check the order”, “change one number and predict”. Use this story: a hedgehog invites a fox to play. The first child writes the steps on paper. The second writes one block per line on strips. The third checks the order using logical thinking. The fourth changes one time number and predicts how long the talk will take. Pass the papers round and then swap jobs.

Practice
1
Put these steps for planting a sunflower seed in the right order: (a) cover the seed with soil (b) dig a small hole (c) water it gently (d) drop the seed in the hole.
2
The block says “move (35) steps”. Change it so that the sprite moves three times as far. What is the new block?
whenclickedmove35steps
3
Look at the Hedgehog and Fox scripts. How long does the whole talk last, and when does the Hedgehog say “Let’s go!”?
4
A beach scene has a crab that says “Hello!” when clicked, a rock, a shell and the sun. Only the crab has a script. How many static objects are there?
crabrockshellsun