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

Test as you go

Week 25 · Unit 10: Be a storyteller · 3 lessons
2

Parts that talk

Computing 2: Unit 10, pp. 134–148
GoalPlan and test two characters that send and receive a message.
New words
message · a signal that one character sends to start anothersend · to give out a messagereceive · to get a message and then start
Explanation

In a story, one character can finish and then the next character starts. The first character sends a message. The second character starts when it receives the message. A message has a colour, such as orange or blue. The colours must match, or the second character will never start. Test each character on its own first. Then test them together.

parrot sends a blue messageblue messagecat starts on blue message
Worked examples
StepParrotCat
1Start on green flagStart on blue message
2Say “Hello!”Say “Meow”
3Send blue messageMove right 2
4StopStop
The algorithm for a two-part story. The parrot sends a blue message. The cat starts when it receives it.
Meow2start onmessagesaymoverightend
To test the cat on its own, tap its blocks. It does not need the parrot. Then tap the green flag to test both together.
sends bluewaits for orange✗
The parrot sends a blue message, but the cat waits for an orange message. The parrot talks. The cat does nothing. The colours do not match, so we change the cat’s first block to blue.
Class activity

Message relay (four players): player 1 starts on a clap, says “Hello!” and passes a blue card to player 2. Player 2 starts only when they get a blue card, claps 3 times and passes an orange card to player 3. Player 3 starts on orange and says “Bye!”. Then try again, but player 1 passes the wrong colour on purpose. What happens?

Practice
1
A second character must start when the first one sends a green message. Which block does it need?
?Hi!
2
The duck sends a red message. The dog starts on a blue message. What happens, and how do you fix it?
sends redwaits for blue
3
How can you test the second character on its own?
4
Write the algorithm for a fox that starts on an orange message, moves left 2, says “Hi!” and stops.