Teach Primary Issue 19.6

Assessment Can children create a variable, with a meaningful name, and manipulate its value in their code? WEEK 5 Learning objective l Clone the star sprite l Make clones vanish when the player touches them After recapping key vocabulary, discuss the idea that catching a single star is not much of a challenge: How could we add more than one star? Could we add more stars without adding and coding more and more sprites? Introduce the [create clone of myself] block. This block duplicates a single sprite, so we don’t need to add (or program) more and more characters. Explain that clones are exact copies of something and then explore the concept of broadcasting and receiving messages . Explain this in terms of your particular routine for calling a class to attention – a bell, a clapped rhythm, etc. You send a message/signal, and the children respond. Similarly, in Scratch we can broadcast a message to trigger something happening. Our player’s sprite will broadcast a message to the star, and the star will respond. Find the broadcast/receive message blocks at the bottom of the ‘Events’ section. Go into the code for the player’s sprite and add [broadcast message1] underneath the [set Score to 0] block. Now we need to program the star to receive that message and react to it. Go into the star’s code and add the [when I receive message1] event block, then attach a [forever] loop. Inside the loop, add a [wait 1 seconds] block, and then a [create clone of myself] block. This is a good moment to ask the children to re-explain the forever loop: What does a loop do? Finally, we will change part of the star code that we first wrote in week 2 and then debugged in week 3. Check the example code for week 5 to see the John Bolton is a computing teacher in a primary school in the SouthWest. projects with additional features. So far, the game has run indefinitely, so you can challenge the children to introduce an end condition . For example, they could count howmany stars appear on screen and end the game once a certain number is reached. Prompt them to think creatively: could they add a time limit, or change the backdrop to signal a new level, or even introduce objects that reduce the score if touched? These enhancements will deepen their understanding and encourage them to apply their knowledge in different ways. And, of course, they allow the children to add polish and personality to their final product. Assessment Can children independently apply coding concepts to complete a functional game? Do they demonstrate understanding of movement, interaction, loops, variables, and cloning through their final project? TP F EATURE S S C I ENC E differences. The key change is that we are replacing the [when green flag clicked] event block with a [when I start as a clone] event block. Discuss the [go to random position] block and show what it does. For a bit of fun, temporarily remove the [wait 1 seconds] block and watch what happens! Assessment Can children explain, either through their code or through discussion, how the sending/receiving of messages enables us to control events in our programs? WEEK 6 Learning objective l Consolidate learning and apply coding concepts by refining a playable game This final lesson provides an opportunity for the children to consolidate their learning by completing and refining their games. Begin with a brief recap of key concepts through guided questions such as: What does a loop do? What is a variable? What happens when we broadcast a message? Revisit the idea of debugging and encourage the children to swap computers with a partner to help identify and fix any remaining issues in their code. For more confident children, this lesson offers scope to extend their classreads.co.uk www.teachwire.net | 33

RkJQdWJsaXNoZXIy OTgwNDE2