Upper KS2 Viking raid animation activity Using sequence in programs Recommended Year Group: Upper key stage 2: Years 5 & 6 Activity Duration: Approximately 1 hour 15 mins Concepts and approaches Algorithms Programming Sequencing Tinkering Debugging Collaborating Curriculum links Computing use sequence in programs History Pupils should be taught about the Vikings. This could include Viking raids (nonstatutory). • • Introduction In this activity pupils program an animation of a Viking raid in Scratch. In doing so they learn that programming is the process of implementing algorithms as code and about the importance of sequencing commands. Prior knowledge KS1 Introduction to algorithms Scratch Tinkering: Pupils should have completed Scratch tinkering so they are familiar with the Scratch programming environment. Ideally, pupils will have learnt about Viking raids in history so this activity can help reinforce this knowledge, however links to resources on Viking raids have also been included in the teaching notes. You may have to extend the duration of this activity if more time is to be spent learning about Viking raids first. Pupil objectives •I can write a program with a sequence of instructions. Resources •MIT’s Scratch 1.4 or Scratch 2.0 (Please refer to this guide on the ways to download and use our Scratch resources in your school) Interactive whiteboard for writing up key terms and pupils’ ideas about Viking raids and to display Scratch as you work through this lesson Viking raid presentation (see download link at bottom of webpage) Viking raid algorithm design sheet (One for each pair – see download link at bottom of webpage) Scratch commands help sheet (One for each pair if required – see download link at bottom of webpage) • • • • Upper KS2 Viking raid animation activity page 1/11 •Viking raid extension (One for each pair if required – see download link at bottom of webpage) Pupil access to the Scratch resources. Either downloaded from the download link at the bottom of this webpage or within the Scratch 2 online editor from these links: Viking raid example animation; Viking raid animation • Before you start •Download the resources required for this activity from the list above. •Load the presentation ready for the lesson. •Print the paper based resources required, as explained above. •Ensure that Scratch is working on your school’s computers and the files for this activity are downloaded and accessible. Organisation •This activity is organised with pupils working in pairs. Each pair will need access to a computer running Scratch and access to the example file. If you do not have a sufficient number of computers to make this possible, you may wish to group pupils in 3s or deliver this lesson with half of your class at a time. Introduction •Recap with pupils what an algorithm is (a sequence of instructions, or a set of rules, for performing a specific task) and ask a couple of pupils to share their own examples of algorithms, perhaps from previous work. Write the word programming on the board and explain that when we program we use an algorithm (which is for humans to follow) to help us write a program in a computer programming language (code) for a computer to follow. Explain that the programming language pupils will be using in this activity is called Scratch. Mention that Scratch is free and pupils can download it or use it online at home (www.scratch.mit.edu). Explain that a programming language, such as Scratch, is made up of commands and other keywords. Ask pupils if they know what the word command means. Discuss that a command instructs us to do something. Explain that similarly commands in Scratch tell the computer what to do and we create a program by joining commands together. Explain that in this lesson we will be programming an animation of a Viking raid using the commands in Scratch and that it is important that the events happen in the correct sequence. Write the word sequence on the board and check pupils are clear that it means order. Show slide 2 of the presentation to share the activity learning objective with your pupils if this is your normal practice. • I can write a program with a sequence of commands • • • • • Recapping about Viking raids (5 mins + depending on pupils’ knowledge of Vikings) •Ask pupils to discuss what they know about Viking raids. Ask some pupils to feedback and write up their ideas on the whiteboard. Review with pupils key points: • Vikings came from Denmark, Norway and Sweden. • Vikings crossed the sea on longships to raid parts of Britain. • In the raids they burned buildings, stole treasures and murdered • Upper KS2 Viking raid animation activity page 2/11 monks. • They retreated back to their home countries after the raid. If pupils need to recap their knowledge about Viking raids, model performing a search of the world wide web to find web pages of information; if time permits ask pupils to think about how these results will have been selected and ranked by the search engine. A selection of web pages has also been provided in the teaching notes. Open the Scratch ‘Viking raid example animation’ file on your interactive whiteboard. Explain to pupils that this is an example of the type of animation they will be creating. Explain that within this program the Viking, Monk and Gold Coins are called sprites, which means they are objects we can program. These are the objects we will be writing a sequence of commands to control. Show pupils that each appears in the sprite selection window, as shown below. Note – a number of other sprites also load with the project (Thor, group of monks, axe and a storm cloud) this are for use in the extension exercise are currently hidden when the project opens. • • • • The Viking raid animation loads with a number of sprites. Pupils will start by using the Viking, monk and gold in their animation. •Click the green flag to watch the animation, as shown below. Click the green flag to watch the example Viking animation Upper KS2 Viking raid animation activity page 3/11 •After watching the animation, ask pupils why the sequence of this animation was important? If the Viking had said he was going to steal the gold coins before seeing them, or the monk had returned from hiding in the woods before the Viking had arrived then the animation would not have made sense. Designing the algorithm for their animation (15 mins) •Explain to pupils that the Scratch file they will use in this activity will load with: the monastery background and three sprites (a Viking, monk and a pot of gold coins) – as was shown in the example animation. Note – other sprites for the extension activity will also load in the Scratch file but will be hidden. Display slide 3 of the presentation and explain that pupils’ first task is to design their animation’s algorithm. Explain that their animation is to show a Viking raid using the three sprites, however emphasise it is up to them to choose what happens in this raid. The algorithm will be created within a storyboard planning sheet as shown on slide 3. Pupils should included details on their algorithm about: • When and how the sprites move • When and what the sprites say Briefly show the example from the model animation on slide 4 to illustrate to pupils one example of how the storyboard might be completed. Remind pupils they are free to choose what happens in their own animation. Point out that each step in the algorithm is numbered. Why do pupils think numbering the steps is important? So we ensure they are in the correct sequence. Pupils should now have 15 mins to work in pairs to create their Viking animation algorithm using the storyboard algorithm design sheet. • • • Introducing the Scratch commands (15 mins) •Once pupils have completed the algorithm design for their animation, open the ‘Viking raid example animation’ Scratch file so it is displaying on the interactive whiteboard. Pupils should open the ‘Viking raid animation’ Scratch file. Once pupils have opened the file they should save their own copy to an appropriate area on the school network with an appropriate file name, e.g. adding their initials to the file name or using their individual accounts on the Scratch website if they have these. • • Selecting ‘File’ then ‘Save as’ in Scratch 1.4 (left) and 2 (right) to save a copy of the project. •Ask pupils what two different actions they were asked to show on their algorithm design? Sprites’ movement and speech. Explain that pupils are going to explore a selection of Scratch’s movement and speech commands so they can turn their algorithms into programs within Scratch. Upper KS2 Viking raid animation activity page 4/11 •Getting the sprites moving •‘go to X: Y:’ & ‘glide _ secs to X: Y: •Explain to pupils that both the ‘go to X: Y:’ and ‘glide _ secs to X: Y:’ commands makes a sprite move to the coordinates entered. Show these two commands within the ‘Motion’ commands. Show the ‘go to X: Y:’ and ‘glide _ secs to X: Y:’ •Recap briefly that pupils will have encountered coordinates in mathematics. Note that pupils without a good knowledge of coordinates in four quadrants can still use these commands (see below) and this will help develop their understanding of coordinates. In addition, the Viking animation example Scratch file loads with an alternative grid background to show the coordinate system. To show this to pupils, select ‘stage’ then ‘background’ and switch to X-Y grid, as shown below Switching to display the coordinate background Upper KS2 Viking raid animation activity page 5/11 Finding the coordinates for the movement blocks (Scratch 1.4 and 2) •Demonstrate to pupils that to find the coordinates that you want the sprite to move to, you follow the simple steps below: 1. Add a movement command to your program (‘go to X: Y:’ or ‘glide _ secs to X: Y:’) 2. Place the cursor where you would like the sprite to move to within the stage. 3. Read the X and Y coordinates shown for that position. 4. Enter these into the movement command block you have added. Two simple steps for finding the coordinates for use in the ‘go to’ and ‘glide to’ commands (Scratch 1.4 & 2) Finding the coordinates for the movement blocks (Scratch 2 only) •If your pupils are using Scratch 2, demonstrate there is a second way for determining the coordinates. Firstly, place the sprite in the location you wish it to move to, highlight that the coordinates in the movement commands automatically update so you can just drag the command into the script area ready to use. Two simple steps for finding the coordinates for use in the ‘go to’ and ‘glide to’ commands (Scratch 1.4 & 2) Upper KS2 Viking raid animation activity page 6/11 •Pupils tinkering: Give pupils a few minutes to tinker with adding a few instances of the movement commands so they become familiar with using these. Lead a discussion with pupils to determine how the sprite moves differently with the ‘go to X: Y:’ and ‘glide _ secs to X: Y:’ commands. Discuss that the ‘go to X: Y:’ command causes a sprite to move instantly to that position, which makes it ideal for setting the starting position of each sprite. Show that the program for the monk and coins sprite in the example animation uses a ‘go to X: Y:’ command to set the initial position of the sprite. Explain to pupils that ensuring sprites start in the correct position is one example of the need to set initial conditions in a program. Add that this is important to remember since programs that don’t set initial conditions may run differently each time. For example, if we didn’t reset a variable being used for a score in a game, we’d find when we played we were continuing with the previous player’s high score. • • Each sprite’s program (monk sprite program shown above) starts with a ‘go to X: Y:’ command to set the initial position. •Getting the sprites to talk ‘Say _ for _ secs’: Show pupils the ‘Say_for_secs’ command from within the command looks command blocks, as shown below. The ‘Say _ for _ secs’ command •Pupils tinkering: Give pupils a few minutes to tinker with the ‘Say _ for _ secs’ command so they become familiar with using this. If you feel your pupils require further support, model adding this command within the Viking’s script area beneath a ‘When green flag clicked’ command illustrating how to add the text you wish the sprite to say and changing the duration they will say it for, as shown below. Upper KS2 Viking raid animation activity page 7/11 Model how to use the ‘Say _ for _ secs’ command in the Viking sprite. •‘Wait _ secs’: Show the ‘wait_secs’ command from the control blocks palette, as shown below. The ‘wait_secs’ command. •Pupils tinkering: Give pupils a few minutes to tinker with adding a few instances of the wait command (with other commands) so they become familiar with using this. If you feel pupils need further support, demonstrate that it causes the program to wait for the time entered before moving on to the next command. This can be demonstrated by adding the command beneath the ‘Say _ for _ secs’ command you have just added to the Viking sprite with another instance of the ‘Say _ for _ secs’ beneath, as shown below. By running this program several times with different ‘wait times’ entered you can illustrated how the command holds the program for the time entered. • llustrate the ‘wait_sec’ command. •Explain that this command is useful in ensuring that the programs for different sprites are correctly sequenced so they move and speak at the right time. When pupils use this command they can first estimate the time they think they will need to enter then run their programs to observe if this was too long or not long enough, and adjust the time accordingly. (Pupils could note the wait and say times on their design sheet to help them keep track of the different sprite timings.) Hide & show: Finally, give pupils time to tinker with using the ‘hide’ and ‘show’ commands from the ‘Looks’ commands. If they require further support explain to pupils that in the example animation program, the ‘hide’ command was used to make the coins sprite disappear so that it looked like the Viking had collected it. This can be shown within the coin sprite’s program, as shown below. Pupils might want to use this command to achieve a similar effect in their programs. If they do it is important that they also use the ‘show’ command at the start of the sprite’s program to ensure it reappears when the program is run again, as shown below. Can pupils recall what including the show command at the start of the program is another example of? Setting the initial conditions of a program. • Upper KS2 Viking raid animation activity page 8/11 Show the use of the ‘show’ and ‘hide’ sprite within the coin sprite. Pupils program their animations (20 mins) •Pupils should now have 20 mins to work in their pairs to implement their Viking raid animation algorithm as a program within Scratch. Discuss with pupils that whilst they have just been tinkering with Scratch to develop their understanding of how commands work, they will now be more purposefully programming as they use their algorithm to change their ideas for their Viking raid into an animation. A Scratch commands help sheet has been provided to support pupils during this part of the activity if the require it. Remind pupils that it can be useful to run their program as they are writing it to check it matches their algorithm design. This might be after adding each new command for each sprite. If it doesn’t do as they wished they should debug their program. Write the four points below up as a guide to help with debugging: • Identify what the program should do? • Observe what the the program does do? • Use your knowledge of the Scratch commands to work out where it went wrong • Fix it • • Extension •An extension activity sheet has been provided which encourages pupils to tinker with using repetition to control the movement of additional sprites within their animation. Plenary (10 mins) •Give pupils time to move around the class and watch a selection of each others’ animations. When sharing their animations with others pupils should firstly show their algorithm to illustrate how they used it to help create their program. After watching an animation pupils should feedback two things they think pupils have done well and one point for improvement. Slide 5 of the presentation has a range of questions to support pupils in giving this feedback. Use think-pair-share to guide a class discussion with the questions on slide 6. • Why was the sequence of commands important? • Can you explain what each command that you have used does and why you needed each? • Did you have any bugs in your program? How did you fix them? • What are the steps we have gone through in creating our program? Write the algorithm; create the program using the commands; test the • Upper KS2 Viking raid animation activity page 9/11 program; debug it by fixing any bugs you find. • How have you learnt this lesson? By tinkering with the Scratch commands; listening to teacher/pupils’ explanations; having a go at programming in Scratch; asking their partners; receiving peer feedback in the plenary. Differentiation Support: Mixed ability pairing should be used to ensure less confident pupils are encouraged by their peers. An additional adult, if available, may work with a small group of pupils to provide additional support. They may plan the algorithm together as a group and work through implementing this as a more guided activity. They may also spend more time looking at how the XY coordinate system is used in the movement commands. • Stretch & challenge: An extension activity is provided above for pupils that complete the main activity. • Assessment opportunities •Informal, teacher assessment of progress during main task, class discussions and plenary. Key pupil knowledge and skills to identify: • Are pupils’ animations correctly sequenced? • Can pupils explain why the sequence of commands was important? • Can pupils explain a selection of the commands they used and why they used those commands? • Can pupils use their knowledge of the Scratch commands to debug their programs? Formal, summative assessment of Scratch projects if required (note however these are completed in pairs). Peer assessment and feedback on each others’ animations during the plenary. • • Teaching Notes Concepts and approaches Algorithms •Before programming the Viking raid animation, pupils work in pairs to create the algorithm describing the sequence of steps. Subsequently, pupils implement this algorithm as a program using the commands in the Scratch programming language. Programming •In this activity pupils create a program in Scratch which is an animation of a Viking raid. In doing so they use their knowledge of the commands in Scratch, the programming language, to implement the algorithm they have written describing the sequence of events in their animation. Programming is the process of implementing an algorithm as code. Upper KS2 Viking raid animation activity page 10/11 Sequence •For pupils animations to make sense they must be sequenced correctly. This requires pupils to firstly correctly sequence their algorithm to illustrate the actions of their sprites. Pupils do this using a storyboard which represents a timeline of events that will occur in their animation. Pupils then have to select the correct sequence of commands in Scratch to implement this algorithm as an animation. Tinkering •Tinkering means trying things out, this is the explorative phase of learning about something. Tinkering should be fun, free, creative and full of questions and surprises. In this activity pupils tinker with a variety of Scratch commands to develop their understanding of how these could be used to create their animation. Debugging •When a program isn’t working correctly, the process of detecting and correcting the errors in a program is called debugging. Bugs happen in programs all the time and so debugging is an important skill to have. In this activity, as pupils construct their program they are encouraged to test their program after they add new commands and debug it if an error has occured. Collaborating •Collaboration is evident here as pupils work with their partners to write the algorithms for their animations and then create the animation in Scratch. Web pages on Viking raids •BBC Schools web page about the Vikings •Horrible Histories song about the Vikings Taking this further / adapting this activity Pupils can create animations in Scratch linking to their learning from across the curriculum. Such animations may be created as an outcome to reinforce and evidence pupils’ wider learning. By using Scratch’s paint editor to design the sprites and the background pupils can draw their own content for such animations. Pupils could, for example, create animations for: The water cycle or life cycles in science Volcanoes and earthquakes in geography To illustrate how their design and technology projects work • • • Related activities Lower KS2 fossil animation sequence activity KS2 Shapes and crystal flowers repetition activity Upper KS2 Viking raid animation activity page 11/11
© Copyright 2024 Paperzz